@tpc-mare/mare-ui-components-react 0.1.2 → 0.1.4
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.
- package/dist/avatar/Avatar.d.ts +2 -0
- package/dist/avatar/Avatar.types.d.ts +26 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +4 -0
- package/dist/badge/Badge.d.ts +2 -0
- package/dist/badge/Badge.types.d.ts +11 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.js +4 -0
- package/dist/drawer/Drawer.d.ts +2 -0
- package/dist/drawer/Drawer.types.d.ts +53 -0
- package/dist/drawer/DrawerFooter.d.ts +2 -0
- package/dist/drawer/DrawerHeader.d.ts +2 -0
- package/dist/drawer/index.d.ts +4 -0
- package/dist/drawer/index.js +6 -0
- package/dist/index/index.d.ts +12 -0
- package/dist/index/index.js +45 -30
- package/dist/input-number/index.js +1 -1
- package/dist/input-text/IconField.d.ts +10 -1
- package/dist/input-text/field-layout.d.ts +7 -1
- package/dist/input-text/index.js +8 -7
- package/dist/menu/Menu.d.ts +2 -0
- package/dist/menu/Menu.types.d.ts +19 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +4 -0
- package/dist/search-field/SearchField.d.ts +2 -0
- package/dist/search-field/SearchField.types.d.ts +26 -0
- package/dist/search-field/index.d.ts +2 -0
- package/dist/search-field/index.js +4 -0
- package/dist/shared/Avatar-D3QlO3Tz.js +59 -0
- package/dist/shared/Badge-WC6my4Aw.js +35 -0
- package/dist/shared/DrawerFooter-DvUgumx0.js +172 -0
- package/dist/shared/HelperText-CVWWvLCI.js +46 -0
- package/dist/shared/IconField-Dh6j6SL1.js +78 -0
- package/dist/shared/{InputNumber-D1KL6s55.js → InputNumber-D48wsE-o.js} +1 -1
- package/dist/shared/Menu-Cv9dU1iA.js +104 -0
- package/dist/shared/SearchField-CgDz_s1O.js +63 -0
- package/dist/shared/Tag-BtbmgIwL.js +36 -0
- package/dist/shared/{Textarea-0XAczkH1.js → Textarea-iJhYTZos.js} +1 -1
- package/dist/shared/{field-layout-BXKpp5E_.js → field-layout-D34MpDMB.js} +16 -12
- package/dist/styles.css +1 -1
- package/dist/tag/Tag.d.ts +2 -0
- package/dist/tag/Tag.types.d.ts +11 -0
- package/dist/tag/index.d.ts +2 -0
- package/dist/tag/index.js +4 -0
- package/dist/textarea/index.js +1 -1
- package/package.json +1 -1
- package/dist/shared/HelperText-D656H0Lf.js +0 -103
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AvatarSize } from '@tpc-development/mare-ui-components-core/avatar';
|
|
2
|
+
export type { AvatarSize } from '@tpc-development/mare-ui-components-core/avatar';
|
|
3
|
+
export interface AvatarProperties {
|
|
4
|
+
/**
|
|
5
|
+
* Image URL. Falls back to the initials derived from `label` while it's
|
|
6
|
+
* loading, missing, or fails to load.
|
|
7
|
+
*/
|
|
8
|
+
image?: string;
|
|
9
|
+
/**
|
|
10
|
+
* `alt` text for the image.
|
|
11
|
+
*/
|
|
12
|
+
alt?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Full name used to derive the fallback initials (e.g. "Tomás Palacio" → "TP").
|
|
15
|
+
*/
|
|
16
|
+
label?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Size variant.
|
|
19
|
+
* @default 'small'
|
|
20
|
+
*/
|
|
21
|
+
size?: AvatarSize;
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the avatar.
|
|
24
|
+
*/
|
|
25
|
+
id?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BadgeSeverity } from '@tpc-development/mare-ui-components-core/badge';
|
|
3
|
+
export type { BadgeSeverity } from '@tpc-development/mare-ui-components-core/badge';
|
|
4
|
+
export interface BadgeProperties {
|
|
5
|
+
/** @default 'accent' */
|
|
6
|
+
severity?: BadgeSeverity;
|
|
7
|
+
/** Shown next to (or instead of) `children`. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** The count/label. A bare dot renders when neither this nor `icon` is set. */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DrawerProperties } from './Drawer.types';
|
|
2
|
+
export declare function Drawer({ open, onOpenChange, position, modal, closeOnEscape, dismissableMask, maskColor, shadow, portalContainer, header, footer, children, 'aria-label': ariaLabel, }: DrawerProperties): import("react").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { DrawerPosition } from '@tpc-development/mare-ui-components-core/drawer';
|
|
3
|
+
export type { DrawerPosition } from '@tpc-development/mare-ui-components-core/drawer';
|
|
4
|
+
export interface DrawerProperties {
|
|
5
|
+
/** Controlled open state. */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Change handler — receives the next open state. */
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
/** Which edge the panel docks to and slides in from. @default 'left' */
|
|
10
|
+
position?: DrawerPosition;
|
|
11
|
+
/** @default true */
|
|
12
|
+
modal?: boolean;
|
|
13
|
+
/** @default true */
|
|
14
|
+
closeOnEscape?: boolean;
|
|
15
|
+
/** Close when clicking the backdrop. @default true */
|
|
16
|
+
dismissableMask?: boolean;
|
|
17
|
+
/** Overrides the backdrop's background class. @default undefined (uses the token overlay color) */
|
|
18
|
+
maskColor?: string;
|
|
19
|
+
/** @default true */
|
|
20
|
+
shadow?: boolean;
|
|
21
|
+
/** Where the drawer portals to. Ark defaults to `document.body` — override
|
|
22
|
+
* this if your app scopes `data-theme` (or any other CSS custom property)
|
|
23
|
+
* to a sub-tree rather than the document root, otherwise the portaled
|
|
24
|
+
* drawer renders outside that scope and loses the tokens. */
|
|
25
|
+
portalContainer?: RefObject<HTMLElement | null>;
|
|
26
|
+
/** Typically a `<DrawerHeader />`. */
|
|
27
|
+
header?: ReactNode;
|
|
28
|
+
/** Typically a `<DrawerFooter>` with action buttons. */
|
|
29
|
+
footer?: ReactNode;
|
|
30
|
+
/** The scrollable body, between header and footer. */
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
/** Fallback accessible label when no title is rendered in the header. */
|
|
33
|
+
'aria-label'?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface DrawerHeaderProperties {
|
|
36
|
+
title?: string;
|
|
37
|
+
/** Closes the drawer on click (matches the legacy header: the LEFT icon
|
|
38
|
+
* always closes, regardless of which glyph it shows). @default a close (X) icon */
|
|
39
|
+
leftIcon?: ReactNode;
|
|
40
|
+
/** Does NOT close the drawer on click — wire that yourself if you need it. @default undefined (no button) */
|
|
41
|
+
rightIcon?: ReactNode;
|
|
42
|
+
onLeftIconClick?: () => void;
|
|
43
|
+
onRightIconClick?: () => void;
|
|
44
|
+
/** @default false */
|
|
45
|
+
border?: boolean;
|
|
46
|
+
/** Shorter header, smaller inline padding — legacy's "slim" variant. @default false */
|
|
47
|
+
compact?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface DrawerFooterProperties {
|
|
50
|
+
/** @default false */
|
|
51
|
+
border?: boolean;
|
|
52
|
+
children?: ReactNode;
|
|
53
|
+
}
|
package/dist/index/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export { Avatar } from '../avatar';
|
|
2
|
+
export type { AvatarProperties, AvatarSize } from '../avatar';
|
|
3
|
+
export { Badge } from '../badge';
|
|
4
|
+
export type { BadgeProperties, BadgeSeverity } from '../badge';
|
|
5
|
+
export { Tag } from '../tag';
|
|
6
|
+
export type { TagProperties, TagSeverity, TagSize } from '../tag';
|
|
1
7
|
export { Button } from '../button';
|
|
2
8
|
export type { ButtonProperties, ButtonSeverity, ButtonSize, ButtonVariant, IconPosition, } from '../button';
|
|
3
9
|
export { SelectField } from '../select-field';
|
|
@@ -12,6 +18,8 @@ export { InputText, CharacterCount, FormField, FloatLabel, IconField, HelperText
|
|
|
12
18
|
export type { InputTextProperties, InputTextSize, CharacterCountProperties, } from '../input-text';
|
|
13
19
|
export { Textarea } from '../textarea';
|
|
14
20
|
export type { TextareaProperties } from '../textarea';
|
|
21
|
+
export { SearchField } from '../search-field';
|
|
22
|
+
export type { SearchFieldProperties } from '../search-field';
|
|
15
23
|
export { InputNumber } from '../input-number';
|
|
16
24
|
export type { InputNumberProperties, InputNumberSize, } from '../input-number';
|
|
17
25
|
export { Checkbox } from '../checkbox';
|
|
@@ -22,3 +30,7 @@ export { Switch } from '../switch';
|
|
|
22
30
|
export type { SwitchProperties, SwitchSize } from '../switch';
|
|
23
31
|
export { Dialog, DialogHeader, DialogFooter } from '../dialog';
|
|
24
32
|
export type { DialogProperties, DialogSize, DialogHeaderProperties, DialogFooterProperties, DialogFooterLayout, } from '../dialog';
|
|
33
|
+
export { Drawer, DrawerHeader, DrawerFooter } from '../drawer';
|
|
34
|
+
export type { DrawerProperties, DrawerPosition, DrawerHeaderProperties, DrawerFooterProperties, } from '../drawer';
|
|
35
|
+
export { Menu } from '../menu';
|
|
36
|
+
export type { MenuProperties, MenuItemData, MenuSeparatorEntry, MenuGroupEntry, MenuEntry, } from '../menu';
|
package/dist/index/index.js
CHANGED
|
@@ -1,33 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { C as
|
|
7
|
-
import { T as d } from "../shared/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
1
|
+
import { A as a } from "../shared/Avatar-D3QlO3Tz.js";
|
|
2
|
+
import { B as t } from "../shared/Badge-WC6my4Aw.js";
|
|
3
|
+
import { T as p } from "../shared/Tag-BtbmgIwL.js";
|
|
4
|
+
import { B as m } from "../shared/Button-AfMqNCme.js";
|
|
5
|
+
import { S as l } from "../shared/SelectField-BSTmWjYy.js";
|
|
6
|
+
import { C as F } from "../shared/Combobox-DeUG_muZ.js";
|
|
7
|
+
import { T as d } from "../shared/Tabs-BqIorZYD.js";
|
|
8
|
+
import { P as D } from "../shared/ProgressSpinner-B-lrS-tu.js";
|
|
9
|
+
import { I as u, a as C } from "../shared/IconField-Dh6j6SL1.js";
|
|
10
|
+
import { C as c, F as g, a as I, H as h } from "../shared/HelperText-CVWWvLCI.js";
|
|
11
|
+
import { T as B } from "../shared/Textarea-iJhYTZos.js";
|
|
12
|
+
import { S as A } from "../shared/SearchField-CgDz_s1O.js";
|
|
13
|
+
import { I as P } from "../shared/InputNumber-D48wsE-o.js";
|
|
14
|
+
import { C as k } from "../shared/Checkbox-DsM70wQl.js";
|
|
15
|
+
import { R as G } from "../shared/RadioGroup-lw27DCoV.js";
|
|
16
|
+
import { S as N } from "../shared/Switch-D6E2OmgE.js";
|
|
17
|
+
import { D as q, a as y, b as z } from "../shared/DialogFooter-DLWy6Mln.js";
|
|
18
|
+
import { D as J, a as K, b as O } from "../shared/DrawerFooter-DvUgumx0.js";
|
|
19
|
+
import { M as U } from "../shared/Menu-Cv9dU1iA.js";
|
|
13
20
|
export {
|
|
14
|
-
a as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
k as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
a as Avatar,
|
|
22
|
+
t as Badge,
|
|
23
|
+
m as Button,
|
|
24
|
+
c as CharacterCount,
|
|
25
|
+
k as Checkbox,
|
|
26
|
+
F as Combobox,
|
|
27
|
+
q as Dialog,
|
|
28
|
+
y as DialogFooter,
|
|
29
|
+
z as DialogHeader,
|
|
30
|
+
J as Drawer,
|
|
31
|
+
K as DrawerFooter,
|
|
32
|
+
O as DrawerHeader,
|
|
33
|
+
g as FloatLabel,
|
|
34
|
+
I as FormField,
|
|
35
|
+
h as HelperText,
|
|
24
36
|
u as IconField,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
P as InputNumber,
|
|
38
|
+
C as InputText,
|
|
39
|
+
U as Menu,
|
|
40
|
+
D as ProgressSpinner,
|
|
41
|
+
G as RadioGroup,
|
|
42
|
+
A as SearchField,
|
|
43
|
+
l as SelectField,
|
|
44
|
+
N as Switch,
|
|
45
|
+
d as Tabs,
|
|
46
|
+
p as Tag,
|
|
47
|
+
B as Textarea
|
|
33
48
|
};
|
|
@@ -2,6 +2,15 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export interface IconFieldProperties {
|
|
3
3
|
icon: ReactNode;
|
|
4
4
|
position?: 'left' | 'right';
|
|
5
|
+
/** Dims the icon to match a disabled sibling input. IconField can't see
|
|
6
|
+
* that prop on its own (it lives on the input, not on IconField) — pass
|
|
7
|
+
* it through explicitly when composing (see SearchField). @default false */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Makes the icon a real click target (a `<button>`, not a decorative
|
|
10
|
+
* `<span>`). @default undefined (decorative) */
|
|
11
|
+
onIconClick?: () => void;
|
|
12
|
+
/** Accessible name for the button, when `onIconClick` is set. */
|
|
13
|
+
iconLabel?: string;
|
|
5
14
|
children?: ReactNode;
|
|
6
15
|
}
|
|
7
|
-
export declare function IconField({ icon, position, children, }: IconFieldProperties): import("react").JSX.Element;
|
|
16
|
+
export declare function IconField({ icon, position, disabled, onIconClick, iconLabel, children, }: IconFieldProperties): import("react").JSX.Element;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export interface FieldLayout {
|
|
2
2
|
hasFloatLabel: boolean;
|
|
3
|
-
iconSide: 'left' | 'right' | null;
|
|
3
|
+
iconSide: 'left' | 'right' | 'both' | null;
|
|
4
4
|
}
|
|
5
5
|
export declare const FieldLayoutContext: import('react').Context<FieldLayout | null>;
|
|
6
6
|
export declare const useFieldLayout: () => FieldLayout | null;
|
|
7
|
+
/** Combines a parent IconField's side (if any) with this one's — nesting two
|
|
8
|
+
* IconFields (one 'left', one 'right') around the same input, e.g.
|
|
9
|
+
* SearchField's search + clear icons, needs both padded, not just the
|
|
10
|
+
* nearest one. Two IconFields on the SAME side is a consumer error; last one
|
|
11
|
+
* wins rather than throwing. */
|
|
12
|
+
export declare const mergeIconSide: (parentSide: FieldLayout["iconSide"], ownSide: "left" | "right") => FieldLayout["iconSide"];
|
package/dist/input-text/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as o, a as r } from "../shared/IconField-Dh6j6SL1.js";
|
|
2
|
+
import { C as s, F as l, a as F, H as p } from "../shared/HelperText-CVWWvLCI.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
s as CharacterCount,
|
|
5
|
+
l as FloatLabel,
|
|
6
|
+
F as FormField,
|
|
7
|
+
p as HelperText,
|
|
8
|
+
o as IconField,
|
|
9
|
+
r as InputText
|
|
9
10
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { MenuEntry, MenuItemData } from '@tpc-development/mare-ui-components-core/menu';
|
|
3
|
+
export type { MenuItemData, MenuSeparatorEntry, MenuGroupEntry, MenuEntry, } from '@tpc-development/mare-ui-components-core/menu';
|
|
4
|
+
export interface MenuProperties {
|
|
5
|
+
/** The element that opens the menu on click — typically a `<Button>`. */
|
|
6
|
+
trigger: ReactNode;
|
|
7
|
+
items: MenuEntry[];
|
|
8
|
+
/** Called with the selected item's `value` when an item (or an item
|
|
9
|
+
* inside a group) is chosen. */
|
|
10
|
+
onSelect?: (value: string) => void;
|
|
11
|
+
/** Custom render for an item's content (icon + label). Defaults to
|
|
12
|
+
* `item.icon` (if any) + `item.label`. */
|
|
13
|
+
renderItem?: (item: MenuItemData) => ReactNode;
|
|
14
|
+
/** Where the menu portals to. Ark defaults to `document.body` — override
|
|
15
|
+
* this if your app scopes `data-theme` (or any other CSS custom property)
|
|
16
|
+
* to a sub-tree rather than the document root, otherwise the portaled
|
|
17
|
+
* menu renders outside that scope and loses the tokens. */
|
|
18
|
+
portalContainer?: RefObject<HTMLElement | null>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InputTextProperties } from '../InputText';
|
|
3
|
+
/** Native passthrough same as InputText, minus what SearchField owns/reshapes. */
|
|
4
|
+
type ForwardedInputProperties = Omit<InputTextProperties, 'value' | 'onValueChange' | 'rounded'>;
|
|
5
|
+
export interface SearchFieldProperties extends ForwardedInputProperties {
|
|
6
|
+
/** Controlled value. */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Controlled change handler — receives the next string value. */
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
/** Shows a spinner instead of the clear icon. @default false */
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
/** Shows a clear (X) button when there's a value. @default false */
|
|
13
|
+
clearable?: boolean;
|
|
14
|
+
/** Overrides the left icon. @default a search icon */
|
|
15
|
+
leftIcon?: ReactNode;
|
|
16
|
+
/** Overrides the clear button's icon. @default a close (X) icon */
|
|
17
|
+
clearIcon?: ReactNode;
|
|
18
|
+
/** Replaces the clear/spinner logic entirely with your own right-side
|
|
19
|
+
* content (matches the legacy: a custom right icon takes over from the
|
|
20
|
+
* built-in clear button). @default undefined */
|
|
21
|
+
rightIcon?: ReactNode;
|
|
22
|
+
/** Fires when the built-in clear button is clicked (clears `value` too).
|
|
23
|
+
* Does NOT fire for a custom `rightIcon` — wire that yourself. */
|
|
24
|
+
onClear?: () => void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as o, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as m } from "@ark-ui/react/avatar";
|
|
3
|
+
const s = (a) => a.normalize("NFD").replaceAll(/[̀-ͯ]/g, ""), d = (a) => {
|
|
4
|
+
if (!a) return "";
|
|
5
|
+
const e = a.trim().split(/\s+/).filter(Boolean);
|
|
6
|
+
if (e.length === 1)
|
|
7
|
+
return s(e[0].slice(0, 2)).toUpperCase();
|
|
8
|
+
const t = s(e[0][0]), r = s(e.at(-1)?.[0] ?? "");
|
|
9
|
+
return (t + r).toUpperCase();
|
|
10
|
+
}, n = `
|
|
11
|
+
mare:inline-flex mare:items-center mare:justify-center
|
|
12
|
+
mare:rounded-full mare:bg-accent-weak mare:text-accent
|
|
13
|
+
|
|
14
|
+
mare:data-size-small:h-8 mare:data-size-small:w-8 mare:data-size-small:text-base
|
|
15
|
+
mare:data-size-medium:h-10 mare:data-size-medium:w-10 mare:data-size-medium:text-base
|
|
16
|
+
`, c = `
|
|
17
|
+
mare:h-full mare:w-full mare:rounded-full mare:object-cover
|
|
18
|
+
`, u = `
|
|
19
|
+
mare:rounded-full
|
|
20
|
+
mare:data-size-small:tpc-typography-body-s
|
|
21
|
+
mare:data-size-medium:tpc-typography-body-m
|
|
22
|
+
`;
|
|
23
|
+
function z({
|
|
24
|
+
image: a,
|
|
25
|
+
alt: e = "",
|
|
26
|
+
label: t = "",
|
|
27
|
+
size: r = "small",
|
|
28
|
+
id: i
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ o(
|
|
31
|
+
m.Root,
|
|
32
|
+
{
|
|
33
|
+
id: i,
|
|
34
|
+
className: n,
|
|
35
|
+
"data-size": r,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ l(
|
|
38
|
+
m.Fallback,
|
|
39
|
+
{
|
|
40
|
+
className: u,
|
|
41
|
+
"data-size": r,
|
|
42
|
+
children: d(t)
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
a && /* @__PURE__ */ l(
|
|
46
|
+
m.Image,
|
|
47
|
+
{
|
|
48
|
+
className: c,
|
|
49
|
+
src: a,
|
|
50
|
+
alt: e
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
z as A
|
|
59
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
const s = `
|
|
3
|
+
mare:rounded-full mare:inline-flex mare:justify-center mare:items-center
|
|
4
|
+
mare:text-center mare:py-0 mare:tpc-typography-label-xs
|
|
5
|
+
mare:h-2 mare:min-w-2 mare:has-value:h-4 mare:has-value:min-w-4
|
|
6
|
+
mare:has-icon:px-0 mare:px-1
|
|
7
|
+
mare:data-severity-accent:bg-accent mare:data-severity-accent:text-on-accent
|
|
8
|
+
mare:data-severity-danger:bg-danger mare:data-severity-danger:text-on-danger
|
|
9
|
+
mare:data-severity-warning:bg-warning mare:data-severity-warning:text-on-warning
|
|
10
|
+
mare:data-severity-highlight:bg-highlight mare:data-severity-highlight:text-on-accent
|
|
11
|
+
mare:data-severity-positive:bg-positive mare:data-severity-positive:text-on-positive
|
|
12
|
+
`;
|
|
13
|
+
function c({
|
|
14
|
+
severity: r = "accent",
|
|
15
|
+
icon: e,
|
|
16
|
+
children: a
|
|
17
|
+
}) {
|
|
18
|
+
const t = !!e, n = t || a != null;
|
|
19
|
+
return /* @__PURE__ */ i(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
className: s,
|
|
23
|
+
"data-severity": r,
|
|
24
|
+
"data-has-value": n ? "true" : void 0,
|
|
25
|
+
"data-has-icon": t ? "true" : void 0,
|
|
26
|
+
children: [
|
|
27
|
+
e,
|
|
28
|
+
a
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
c as B
|
|
35
|
+
};
|