@brycks/core-front 0.3.6 → 0.6.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.
- package/dist/components/data/List/List.cjs +1 -1
- package/dist/components/data/List/List.cjs.map +1 -1
- package/dist/components/data/List/List.js +68 -148
- package/dist/components/data/List/List.js.map +1 -1
- package/dist/components/data/Table/Table.cjs +1 -1
- package/dist/components/data/Table/Table.cjs.map +1 -1
- package/dist/components/data/Table/Table.js +148 -217
- package/dist/components/data/Table/Table.js.map +1 -1
- package/dist/components/data/TreeView/TreeView.cjs +1 -1
- package/dist/components/data/TreeView/TreeView.cjs.map +1 -1
- package/dist/components/data/TreeView/TreeView.js +141 -182
- package/dist/components/data/TreeView/TreeView.js.map +1 -1
- package/dist/components/data.cjs +1 -1
- package/dist/components/data.js +23 -21
- package/dist/components/feedback/Banner/Banner.cjs +2 -0
- package/dist/components/feedback/Banner/Banner.cjs.map +1 -0
- package/dist/components/feedback/Banner/Banner.js +77 -0
- package/dist/components/feedback/Banner/Banner.js.map +1 -0
- package/dist/components/feedback/ConfirmDialog/ConfirmDialog.cjs +2 -0
- package/dist/components/feedback/ConfirmDialog/ConfirmDialog.cjs.map +1 -0
- package/dist/components/feedback/ConfirmDialog/ConfirmDialog.js +68 -0
- package/dist/components/feedback/ConfirmDialog/ConfirmDialog.js.map +1 -0
- package/dist/components/feedback/Drawer/Drawer.cjs +1 -22
- package/dist/components/feedback/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/feedback/Drawer/Drawer.js +84 -184
- package/dist/components/feedback/Drawer/Drawer.js.map +1 -1
- package/dist/components/feedback/Modal/Modal.cjs +1 -1
- package/dist/components/feedback/Modal/Modal.cjs.map +1 -1
- package/dist/components/feedback/Modal/Modal.js +73 -150
- package/dist/components/feedback/Modal/Modal.js.map +1 -1
- package/dist/components/feedback/Popover/Popover.cjs +2 -2
- package/dist/components/feedback/Popover/Popover.cjs.map +1 -1
- package/dist/components/feedback/Popover/Popover.js +43 -44
- package/dist/components/feedback/Popover/Popover.js.map +1 -1
- package/dist/components/feedback/Toast/Toast.cjs +1 -10
- package/dist/components/feedback/Toast/Toast.cjs.map +1 -1
- package/dist/components/feedback/Toast/Toast.js +94 -187
- package/dist/components/feedback/Toast/Toast.js.map +1 -1
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.js +17 -13
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/form/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/form/Checkbox/Checkbox.js +11 -11
- package/dist/components/form/Combobox/Combobox.cjs +1 -6
- package/dist/components/form/Combobox/Combobox.cjs.map +1 -1
- package/dist/components/form/Combobox/Combobox.js +190 -266
- package/dist/components/form/Combobox/Combobox.js.map +1 -1
- package/dist/components/form/Input/Input.cjs +1 -1
- package/dist/components/form/Input/Input.cjs.map +1 -1
- package/dist/components/form/Input/Input.js +38 -133
- package/dist/components/form/Input/Input.js.map +1 -1
- package/dist/components/form/SearchInput/SearchInput.cjs +2 -0
- package/dist/components/form/SearchInput/SearchInput.cjs.map +1 -0
- package/dist/components/form/SearchInput/SearchInput.js +68 -0
- package/dist/components/form/SearchInput/SearchInput.js.map +1 -0
- package/dist/components/form/Select/Select.cjs +1 -1
- package/dist/components/form/Select/Select.cjs.map +1 -1
- package/dist/components/form/Select/Select.js +36 -82
- package/dist/components/form/Select/Select.js.map +1 -1
- package/dist/components/form/TagInput/TagInput.cjs +1 -1
- package/dist/components/form/TagInput/TagInput.js +8 -8
- package/dist/components/form/Textarea/Textarea.cjs +1 -1
- package/dist/components/form/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/form/Textarea/Textarea.js +61 -95
- package/dist/components/form/Textarea/Textarea.js.map +1 -1
- package/dist/components/form.cjs +1 -1
- package/dist/components/form.js +15 -13
- package/dist/components/form.js.map +1 -1
- package/dist/components/layout/Card/Card.cjs +1 -1
- package/dist/components/layout/Card/Card.cjs.map +1 -1
- package/dist/components/layout/Card/Card.js +7 -5
- package/dist/components/layout/Card/Card.js.map +1 -1
- package/dist/components/navigation/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/navigation/ContextMenu/ContextMenu.js +9 -9
- package/dist/components/navigation/Menu/Menu.cjs +1 -1
- package/dist/components/navigation/Menu/Menu.cjs.map +1 -1
- package/dist/components/navigation/Menu/Menu.js +70 -135
- package/dist/components/navigation/Menu/Menu.js.map +1 -1
- package/dist/components/navigation/Pagination/Pagination.cjs +1 -1
- package/dist/components/navigation/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +87 -157
- package/dist/components/navigation/Pagination/Pagination.js.map +1 -1
- package/dist/components/navigation/SegmentedControl/SegmentedControl.cjs +2 -0
- package/dist/components/navigation/SegmentedControl/SegmentedControl.cjs.map +1 -0
- package/dist/components/navigation/SegmentedControl/SegmentedControl.js +90 -0
- package/dist/components/navigation/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.js +25 -23
- package/dist/components/navigation.js.map +1 -1
- package/dist/components/utility/Avatar/Avatar.cjs +1 -1
- package/dist/components/utility/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/utility/Avatar/Avatar.js +18 -18
- package/dist/components/utility/Avatar/Avatar.js.map +1 -1
- package/dist/components/utility/Badge/Badge.cjs +1 -1
- package/dist/components/utility/Badge/Badge.cjs.map +1 -1
- package/dist/components/utility/Badge/Badge.js +31 -23
- package/dist/components/utility/Badge/Badge.js.map +1 -1
- package/dist/components/utility/Kbd/Kbd.cjs +2 -0
- package/dist/components/utility/Kbd/Kbd.cjs.map +1 -0
- package/dist/components/utility/Kbd/Kbd.js +20 -0
- package/dist/components/utility/Kbd/Kbd.js.map +1 -0
- package/dist/components/utility/Logo/Logo.cjs +1 -1
- package/dist/components/utility/Logo/Logo.cjs.map +1 -1
- package/dist/components/utility/Logo/Logo.js +19 -19
- package/dist/components/utility/Logo/Logo.js.map +1 -1
- package/dist/components/utility.cjs +1 -1
- package/dist/components/utility.js +9 -7
- package/dist/components/utility.js.map +1 -1
- package/dist/data.d.ts +34 -1
- package/dist/feedback.d.ts +67 -2
- package/dist/form.d.ts +31 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +184 -3
- package/dist/index.js +177 -165
- package/dist/index.js.map +1 -1
- package/dist/navigation.d.ts +39 -0
- package/dist/styles.css +1 -1
- package/dist/utility.d.ts +19 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.cjs","sources":["../../../../src/components/utility/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type ButtonHTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<AvatarSize, number> = {\n xs: 24,\n sm: 32,\n md: 40,\n lg: 48,\n xl: 64,\n}\n\nconst fontSizeMap: Record<AvatarSize, number> = {\n xs: 10,\n sm: 12,\n md: 14,\n lg: 18,\n xl: 24,\n}\n\nexport interface AvatarProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** Size of the avatar */\n size?: AvatarSize\n /** Name to display initials from */\n name?: string\n /** Image source URL */\n src?: string\n /** Alt text for the image */\n alt?: string\n /** Custom content to render inside */\n children?: ReactNode\n /** Whether the avatar is interactive (button) or static (div) */\n interactive?: boolean\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/)\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase()\n }\n return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase()\n}\n\nexport const Avatar = forwardRef<HTMLButtonElement | HTMLDivElement, AvatarProps>(\n function Avatar(\n {\n size = 'md',\n name,\n src,\n alt,\n children,\n interactive = false,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n\n const avatarStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: '50%',\n background: src
|
|
1
|
+
{"version":3,"file":"Avatar.cjs","sources":["../../../../src/components/utility/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type ButtonHTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<AvatarSize, number> = {\n xs: 24,\n sm: 32,\n md: 40,\n lg: 48,\n xl: 64,\n}\n\nconst fontSizeMap: Record<AvatarSize, number> = {\n xs: 10,\n sm: 12,\n md: 14,\n lg: 18,\n xl: 24,\n}\n\nexport interface AvatarProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** Size of the avatar */\n size?: AvatarSize\n /** Name to display initials from */\n name?: string\n /** Image source URL */\n src?: string\n /** Alt text for the image */\n alt?: string\n /** Custom content to render inside */\n children?: ReactNode\n /** Whether the avatar is interactive (button) or static (div) */\n interactive?: boolean\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/)\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase()\n }\n return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase()\n}\n\nexport const Avatar = forwardRef<HTMLButtonElement | HTMLDivElement, AvatarProps>(\n function Avatar(\n {\n size = 'md',\n name,\n src,\n alt,\n children,\n interactive = false,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n\n const avatarStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: '50%',\n background: src ? 'transparent' : 'var(--brycks-primary-default)',\n color: 'var(--brycks-primary-foreground)',\n fontWeight: 600,\n fontSize,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n border: 'none',\n padding: 0,\n cursor: interactive ? 'pointer' : 'default',\n ...style,\n }\n\n const content = src ? (\n <img\n src={src}\n alt={alt || name || 'Avatar'}\n style={{\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n }}\n />\n ) : children ? (\n children\n ) : name ? (\n getInitials(name)\n ) : (\n '?'\n )\n\n if (interactive) {\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n className={cx('brycks-avatar', className)}\n style={avatarStyle}\n data-testid={testId}\n {...props}\n >\n {content}\n </button>\n )\n }\n\n return (\n <div\n ref={ref as React.Ref<HTMLDivElement>}\n className={cx('brycks-avatar', className)}\n style={avatarStyle}\n data-testid={testId}\n aria-hidden={!alt}\n >\n {content}\n </div>\n )\n }\n)\n\nAvatar.displayName = 'Avatar'\n"],"names":["sizeMap","fontSizeMap","getInitials","name","parts","Avatar","forwardRef","size","src","alt","children","interactive","className","testId","style","props","ref","dimension","fontSize","avatarStyle","content","jsx","cx"],"mappings":"+KAKMA,EAAsC,CAC1C,GAAI,GACJ,GAAI,GACJ,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAEMC,EAA0C,CAC9C,GAAI,GACJ,GAAI,GACJ,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAqBA,SAASC,EAAYC,EAAsB,CACzC,MAAMC,EAAQD,EAAK,KAAA,EAAO,MAAM,KAAK,EACrC,OAAIC,EAAM,SAAW,EACZA,EAAM,CAAC,EAAE,OAAO,CAAC,EAAE,YAAA,GAEpBA,EAAM,CAAC,EAAE,OAAO,CAAC,EAAIA,EAAMA,EAAM,OAAS,CAAC,EAAE,OAAO,CAAC,GAAG,YAAA,CAClE,CAEO,MAAMC,EAASC,EAAAA,WACpB,SACE,CACE,KAAAC,EAAO,KACP,KAAAJ,EACA,IAAAK,EACA,IAAAC,EACA,SAAAC,EACA,YAAAC,EAAc,GACd,UAAAC,EACA,OAAAC,EACA,MAAAC,EACA,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAYjB,EAAQO,CAAI,EACxBW,EAAWjB,EAAYM,CAAI,EAE3BY,EAA6B,CACjC,MAAOF,EACP,OAAQA,EACR,SAAUA,EACV,aAAc,MACd,WAAYT,EAAM,cAAgB,gCAClC,MAAO,mCACP,WAAY,IACZ,SAAAU,EACA,QAAS,OACT,WAAY,SACZ,eAAgB,SAChB,SAAU,SACV,OAAQ,OACR,QAAS,EACT,OAAQP,EAAc,UAAY,UAClC,GAAGG,CAAA,EAGCM,EAAUZ,EACda,EAAAA,IAAC,MAAA,CACC,IAAAb,EACA,IAAKC,GAAON,GAAQ,SACpB,MAAO,CACL,MAAO,OACP,OAAQ,OACR,UAAW,OAAA,CACb,CAAA,EAEAO,IAEAP,EACFD,EAAYC,CAAI,EAEhB,KAGF,OAAIQ,EAEAU,EAAAA,IAAC,SAAA,CACC,IAAAL,EACA,KAAK,SACL,UAAWM,EAAAA,GAAG,gBAAiBV,CAAS,EACxC,MAAOO,EACP,cAAaN,EACZ,GAAGE,EAEH,SAAAK,CAAA,CAAA,EAMLC,EAAAA,IAAC,MAAA,CACC,IAAAL,EACA,UAAWM,EAAAA,GAAG,gBAAiBV,CAAS,EACxC,MAAOO,EACP,cAAaN,EACb,cAAa,CAACJ,EAEb,SAAAW,CAAA,CAAA,CAGP,CACF,EAEAf,EAAO,YAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as v } from "react";
|
|
3
|
-
import { cx as
|
|
3
|
+
import { cx as h } from "../../../utils/styles.js";
|
|
4
4
|
const b = {
|
|
5
5
|
xs: 24,
|
|
6
6
|
sm: 32,
|
|
@@ -14,8 +14,8 @@ const b = {
|
|
|
14
14
|
lg: 18,
|
|
15
15
|
xl: 24
|
|
16
16
|
};
|
|
17
|
-
function A(
|
|
18
|
-
const t =
|
|
17
|
+
function A(o) {
|
|
18
|
+
const t = o.trim().split(/\s+/);
|
|
19
19
|
return t.length === 1 ? t[0].charAt(0).toUpperCase() : (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase();
|
|
20
20
|
}
|
|
21
21
|
const k = v(
|
|
@@ -23,23 +23,23 @@ const k = v(
|
|
|
23
23
|
size: t = "md",
|
|
24
24
|
name: r,
|
|
25
25
|
src: a,
|
|
26
|
-
alt:
|
|
26
|
+
alt: i,
|
|
27
27
|
children: s,
|
|
28
28
|
interactive: d = !1,
|
|
29
29
|
className: c,
|
|
30
30
|
testId: l,
|
|
31
|
-
style:
|
|
32
|
-
...
|
|
31
|
+
style: u,
|
|
32
|
+
...y
|
|
33
33
|
}, p) {
|
|
34
|
-
const e = b[t],
|
|
34
|
+
const e = b[t], g = x[t], f = {
|
|
35
35
|
width: e,
|
|
36
36
|
height: e,
|
|
37
37
|
minWidth: e,
|
|
38
38
|
borderRadius: "50%",
|
|
39
|
-
background: a ? "transparent" : "
|
|
40
|
-
color: "
|
|
39
|
+
background: a ? "transparent" : "var(--brycks-primary-default)",
|
|
40
|
+
color: "var(--brycks-primary-foreground)",
|
|
41
41
|
fontWeight: 600,
|
|
42
|
-
fontSize:
|
|
42
|
+
fontSize: g,
|
|
43
43
|
display: "flex",
|
|
44
44
|
alignItems: "center",
|
|
45
45
|
justifyContent: "center",
|
|
@@ -47,12 +47,12 @@ const k = v(
|
|
|
47
47
|
border: "none",
|
|
48
48
|
padding: 0,
|
|
49
49
|
cursor: d ? "pointer" : "default",
|
|
50
|
-
...
|
|
50
|
+
...u
|
|
51
51
|
}, m = a ? /* @__PURE__ */ n(
|
|
52
52
|
"img",
|
|
53
53
|
{
|
|
54
54
|
src: a,
|
|
55
|
-
alt:
|
|
55
|
+
alt: i || r || "Avatar",
|
|
56
56
|
style: {
|
|
57
57
|
width: "100%",
|
|
58
58
|
height: "100%",
|
|
@@ -65,20 +65,20 @@ const k = v(
|
|
|
65
65
|
{
|
|
66
66
|
ref: p,
|
|
67
67
|
type: "button",
|
|
68
|
-
className:
|
|
69
|
-
style:
|
|
68
|
+
className: h("brycks-avatar", c),
|
|
69
|
+
style: f,
|
|
70
70
|
"data-testid": l,
|
|
71
|
-
...
|
|
71
|
+
...y,
|
|
72
72
|
children: m
|
|
73
73
|
}
|
|
74
74
|
) : /* @__PURE__ */ n(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
77
|
ref: p,
|
|
78
|
-
className:
|
|
79
|
-
style:
|
|
78
|
+
className: h("brycks-avatar", c),
|
|
79
|
+
style: f,
|
|
80
80
|
"data-testid": l,
|
|
81
|
-
"aria-hidden": !
|
|
81
|
+
"aria-hidden": !i,
|
|
82
82
|
children: m
|
|
83
83
|
}
|
|
84
84
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../../../../src/components/utility/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type ButtonHTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<AvatarSize, number> = {\n xs: 24,\n sm: 32,\n md: 40,\n lg: 48,\n xl: 64,\n}\n\nconst fontSizeMap: Record<AvatarSize, number> = {\n xs: 10,\n sm: 12,\n md: 14,\n lg: 18,\n xl: 24,\n}\n\nexport interface AvatarProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** Size of the avatar */\n size?: AvatarSize\n /** Name to display initials from */\n name?: string\n /** Image source URL */\n src?: string\n /** Alt text for the image */\n alt?: string\n /** Custom content to render inside */\n children?: ReactNode\n /** Whether the avatar is interactive (button) or static (div) */\n interactive?: boolean\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/)\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase()\n }\n return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase()\n}\n\nexport const Avatar = forwardRef<HTMLButtonElement | HTMLDivElement, AvatarProps>(\n function Avatar(\n {\n size = 'md',\n name,\n src,\n alt,\n children,\n interactive = false,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n\n const avatarStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: '50%',\n background: src
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../../src/components/utility/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type ButtonHTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<AvatarSize, number> = {\n xs: 24,\n sm: 32,\n md: 40,\n lg: 48,\n xl: 64,\n}\n\nconst fontSizeMap: Record<AvatarSize, number> = {\n xs: 10,\n sm: 12,\n md: 14,\n lg: 18,\n xl: 24,\n}\n\nexport interface AvatarProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** Size of the avatar */\n size?: AvatarSize\n /** Name to display initials from */\n name?: string\n /** Image source URL */\n src?: string\n /** Alt text for the image */\n alt?: string\n /** Custom content to render inside */\n children?: ReactNode\n /** Whether the avatar is interactive (button) or static (div) */\n interactive?: boolean\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/)\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase()\n }\n return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase()\n}\n\nexport const Avatar = forwardRef<HTMLButtonElement | HTMLDivElement, AvatarProps>(\n function Avatar(\n {\n size = 'md',\n name,\n src,\n alt,\n children,\n interactive = false,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n\n const avatarStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: '50%',\n background: src ? 'transparent' : 'var(--brycks-primary-default)',\n color: 'var(--brycks-primary-foreground)',\n fontWeight: 600,\n fontSize,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n border: 'none',\n padding: 0,\n cursor: interactive ? 'pointer' : 'default',\n ...style,\n }\n\n const content = src ? (\n <img\n src={src}\n alt={alt || name || 'Avatar'}\n style={{\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n }}\n />\n ) : children ? (\n children\n ) : name ? (\n getInitials(name)\n ) : (\n '?'\n )\n\n if (interactive) {\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n className={cx('brycks-avatar', className)}\n style={avatarStyle}\n data-testid={testId}\n {...props}\n >\n {content}\n </button>\n )\n }\n\n return (\n <div\n ref={ref as React.Ref<HTMLDivElement>}\n className={cx('brycks-avatar', className)}\n style={avatarStyle}\n data-testid={testId}\n aria-hidden={!alt}\n >\n {content}\n </div>\n )\n }\n)\n\nAvatar.displayName = 'Avatar'\n"],"names":["sizeMap","fontSizeMap","getInitials","name","parts","Avatar","forwardRef","size","src","alt","children","interactive","className","testId","style","props","ref","dimension","fontSize","avatarStyle","content","jsx","cx"],"mappings":";;;AAKA,MAAMA,IAAsC;AAAA,EAC1C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAqBA,SAASC,EAAYC,GAAsB;AACzC,QAAMC,IAAQD,EAAK,KAAA,EAAO,MAAM,KAAK;AACrC,SAAIC,EAAM,WAAW,IACZA,EAAM,CAAC,EAAE,OAAO,CAAC,EAAE,YAAA,KAEpBA,EAAM,CAAC,EAAE,OAAO,CAAC,IAAIA,EAAMA,EAAM,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG,YAAA;AAClE;AAEO,MAAMC,IAASC;AAAA,EACpB,SACE;AAAA,IACE,MAAAC,IAAO;AAAA,IACP,MAAAJ;AAAA,IACA,KAAAK;AAAA,IACA,KAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAMC,IAAYjB,EAAQO,CAAI,GACxBW,IAAWjB,EAAYM,CAAI,GAE3BY,IAA6B;AAAA,MACjC,OAAOF;AAAA,MACP,QAAQA;AAAA,MACR,UAAUA;AAAA,MACV,cAAc;AAAA,MACd,YAAYT,IAAM,gBAAgB;AAAA,MAClC,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,UAAAU;AAAA,MACA,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,QAAQP,IAAc,YAAY;AAAA,MAClC,GAAGG;AAAA,IAAA,GAGCM,IAAUZ,IACd,gBAAAa;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAb;AAAA,QACA,KAAKC,KAAON,KAAQ;AAAA,QACpB,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QAAA;AAAA,MACb;AAAA,IAAA,IAEAO,MAEAP,IACFD,EAAYC,CAAI,IAEhB;AAGF,WAAIQ,IAEA,gBAAAU;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAL;AAAA,QACA,MAAK;AAAA,QACL,WAAWM,EAAG,iBAAiBV,CAAS;AAAA,QACxC,OAAOO;AAAA,QACP,eAAaN;AAAA,QACZ,GAAGE;AAAA,QAEH,UAAAK;AAAA,MAAA;AAAA,IAAA,IAML,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAL;AAAA,QACA,WAAWM,EAAG,iBAAiBV,CAAS;AAAA,QACxC,OAAOO;AAAA,QACP,eAAaN;AAAA,QACb,eAAa,CAACJ;AAAA,QAEb,UAAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAf,EAAO,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("react"),k=require("../../../utils/styles.cjs"),r=o.forwardRef(function({variant:d="subtle",intent:c="neutral",size:t="md",dot:e=!1,leftIcon:a,className:n,style:i,testId:b,children:g,...l},u){const y=e||!!a;return s.jsxs("span",{ref:u,className:k.cx("brycks-badge",`brycks-badge--${d}`,`brycks-badge--${c}`,`brycks-badge--${t}`,y&&"brycks-badge--with-leading",n),style:i,"data-testid":b,...l,children:[e&&s.jsx("span",{className:"brycks-badge__dot","aria-hidden":"true"}),!e&&a&&s.jsx("span",{className:"brycks-badge__icon",children:a}),g]})});r.displayName="Badge";exports.Badge=r;
|
|
2
2
|
//# sourceMappingURL=Badge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.cjs","sources":["../../../../src/components/utility/Badge/Badge.tsx"],"sourcesContent":["/**\r\n * Badge Component\r\n *\r\n * Small label for status, counts, or categorization.\r\n * Clean, minimal design with subtle color coding.\r\n *\r\n * All color styles are handled via CSS classes for easy customization.\r\n */\r\n\r\nimport {\r\n forwardRef,\r\n type ReactNode,\r\n type HTMLAttributes,\r\n} from 'react'\r\nimport { cx } from '../../../utils/styles'\r\n\r\nexport type BadgeVariant = 'solid' | 'subtle' | 'outline'\r\nexport type BadgeIntent = 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'error' | 'info'\r\nexport type BadgeSize = 'sm' | 'md' | 'lg'\r\n\r\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\r\n /** Visual variant */\r\n variant?: BadgeVariant\r\n /** Color intent */\r\n intent?: BadgeIntent\r\n /** Size */\r\n size?: BadgeSize\r\n /** Custom class name */\r\n className?: string\r\n /** Test ID */\r\n testId?: string\r\n /** Badge content */\r\n children?: ReactNode\r\n}\r\n\r\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\r\n {\r\n variant = 'subtle',\r\n intent = 'neutral',\r\n size = 'md',\r\n className,\r\n style,\r\n testId,\r\n children,\r\n ...props\r\n },\r\n ref\r\n) {\r\n return (\r\n <span\r\n ref={ref}\r\n className={cx(\r\n 'brycks-badge',\r\n `brycks-badge--${variant}`,\r\n `brycks-badge--${intent}`,\r\n `brycks-badge--${size}`,\r\n className\r\n )}\r\n style={style}\r\n data-testid={testId}\r\n {...props}\r\n >\r\n {children}\r\n </span>\r\n )\r\n})\r\n\r\nBadge.displayName = 'Badge'\r\n"],"names":["Badge","forwardRef","variant","intent","size","className","style","testId","children","props","ref","
|
|
1
|
+
{"version":3,"file":"Badge.cjs","sources":["../../../../src/components/utility/Badge/Badge.tsx"],"sourcesContent":["/**\r\n * Badge Component\r\n *\r\n * Small label for status, counts, or categorization.\r\n * Clean, minimal design with subtle color coding.\r\n *\r\n * All color styles are handled via CSS classes for easy customization.\r\n */\r\n\r\nimport {\r\n forwardRef,\r\n type ReactNode,\r\n type HTMLAttributes,\r\n} from 'react'\r\nimport { cx } from '../../../utils/styles'\r\n\r\nexport type BadgeVariant = 'solid' | 'subtle' | 'outline'\r\nexport type BadgeIntent = 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'error' | 'info'\r\nexport type BadgeSize = 'sm' | 'md' | 'lg'\r\n\r\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\r\n /** Visual variant */\r\n variant?: BadgeVariant\r\n /** Color intent */\r\n intent?: BadgeIntent\r\n /** Size */\r\n size?: BadgeSize\r\n /** Show a leading status dot in the intent color (a non-color status cue) */\r\n dot?: boolean\r\n /** Leading icon (e.g. a HugeIcon). Prefer this over emoji as a label icon */\r\n leftIcon?: ReactNode\r\n /** Custom class name */\r\n className?: string\r\n /** Test ID */\r\n testId?: string\r\n /** Badge content */\r\n children?: ReactNode\r\n}\r\n\r\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\r\n {\r\n variant = 'subtle',\r\n intent = 'neutral',\r\n size = 'md',\r\n dot = false,\r\n leftIcon,\r\n className,\r\n style,\r\n testId,\r\n children,\r\n ...props\r\n },\r\n ref\r\n) {\r\n const hasLeading = dot || !!leftIcon\r\n\r\n return (\r\n <span\r\n ref={ref}\r\n className={cx(\r\n 'brycks-badge',\r\n `brycks-badge--${variant}`,\r\n `brycks-badge--${intent}`,\r\n `brycks-badge--${size}`,\r\n hasLeading && 'brycks-badge--with-leading',\r\n className\r\n )}\r\n style={style}\r\n data-testid={testId}\r\n {...props}\r\n >\r\n {dot && <span className=\"brycks-badge__dot\" aria-hidden=\"true\" />}\r\n {!dot && leftIcon && <span className=\"brycks-badge__icon\">{leftIcon}</span>}\r\n {children}\r\n </span>\r\n )\r\n})\r\n\r\nBadge.displayName = 'Badge'\r\n"],"names":["Badge","forwardRef","variant","intent","size","dot","leftIcon","className","style","testId","children","props","ref","hasLeading","jsxs","cx","jsx"],"mappings":"+KAuCaA,EAAQC,EAAAA,WAAwC,SAC3D,CACE,QAAAC,EAAU,SACV,OAAAC,EAAS,UACT,KAAAC,EAAO,KACP,IAAAC,EAAM,GACN,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAaR,GAAO,CAAC,CAACC,EAE5B,OACEQ,EAAAA,KAAC,OAAA,CACC,IAAAF,EACA,UAAWG,EAAAA,GACT,eACA,iBAAiBb,CAAO,GACxB,iBAAiBC,CAAM,GACvB,iBAAiBC,CAAI,GACrBS,GAAc,6BACdN,CAAA,EAEF,MAAAC,EACA,cAAaC,EACZ,GAAGE,EAEH,SAAA,CAAAN,GAAOW,EAAAA,IAAC,OAAA,CAAK,UAAU,oBAAoB,cAAY,OAAO,EAC9D,CAACX,GAAOC,SAAa,OAAA,CAAK,UAAU,qBAAsB,SAAAA,EAAS,EACnEI,CAAA,CAAA,CAAA,CAGP,CAAC,EAEDV,EAAM,YAAc"}
|
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cx as
|
|
4
|
-
const
|
|
5
|
-
variant:
|
|
6
|
-
intent:
|
|
7
|
-
size:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { cx as y } from "../../../utils/styles.js";
|
|
4
|
+
const k = p(function({
|
|
5
|
+
variant: r = "subtle",
|
|
6
|
+
intent: d = "neutral",
|
|
7
|
+
size: b = "md",
|
|
8
|
+
dot: a = !1,
|
|
9
|
+
leftIcon: s,
|
|
10
|
+
className: c,
|
|
11
|
+
style: i,
|
|
12
|
+
testId: n,
|
|
13
|
+
children: g,
|
|
14
|
+
...t
|
|
13
15
|
}, m) {
|
|
14
|
-
|
|
16
|
+
const o = a || !!s;
|
|
17
|
+
return /* @__PURE__ */ l(
|
|
15
18
|
"span",
|
|
16
19
|
{
|
|
17
20
|
ref: m,
|
|
18
|
-
className:
|
|
21
|
+
className: y(
|
|
19
22
|
"brycks-badge",
|
|
20
|
-
`brycks-badge--${a}`,
|
|
21
23
|
`brycks-badge--${r}`,
|
|
22
|
-
`brycks-badge--${
|
|
23
|
-
|
|
24
|
+
`brycks-badge--${d}`,
|
|
25
|
+
`brycks-badge--${b}`,
|
|
26
|
+
o && "brycks-badge--with-leading",
|
|
27
|
+
c
|
|
24
28
|
),
|
|
25
|
-
style:
|
|
26
|
-
"data-testid":
|
|
27
|
-
...
|
|
28
|
-
children:
|
|
29
|
+
style: i,
|
|
30
|
+
"data-testid": n,
|
|
31
|
+
...t,
|
|
32
|
+
children: [
|
|
33
|
+
a && /* @__PURE__ */ e("span", { className: "brycks-badge__dot", "aria-hidden": "true" }),
|
|
34
|
+
!a && s && /* @__PURE__ */ e("span", { className: "brycks-badge__icon", children: s }),
|
|
35
|
+
g
|
|
36
|
+
]
|
|
29
37
|
}
|
|
30
38
|
);
|
|
31
39
|
});
|
|
32
|
-
|
|
40
|
+
k.displayName = "Badge";
|
|
33
41
|
export {
|
|
34
|
-
|
|
42
|
+
k as Badge
|
|
35
43
|
};
|
|
36
44
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../../src/components/utility/Badge/Badge.tsx"],"sourcesContent":["/**\r\n * Badge Component\r\n *\r\n * Small label for status, counts, or categorization.\r\n * Clean, minimal design with subtle color coding.\r\n *\r\n * All color styles are handled via CSS classes for easy customization.\r\n */\r\n\r\nimport {\r\n forwardRef,\r\n type ReactNode,\r\n type HTMLAttributes,\r\n} from 'react'\r\nimport { cx } from '../../../utils/styles'\r\n\r\nexport type BadgeVariant = 'solid' | 'subtle' | 'outline'\r\nexport type BadgeIntent = 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'error' | 'info'\r\nexport type BadgeSize = 'sm' | 'md' | 'lg'\r\n\r\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\r\n /** Visual variant */\r\n variant?: BadgeVariant\r\n /** Color intent */\r\n intent?: BadgeIntent\r\n /** Size */\r\n size?: BadgeSize\r\n /** Custom class name */\r\n className?: string\r\n /** Test ID */\r\n testId?: string\r\n /** Badge content */\r\n children?: ReactNode\r\n}\r\n\r\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\r\n {\r\n variant = 'subtle',\r\n intent = 'neutral',\r\n size = 'md',\r\n className,\r\n style,\r\n testId,\r\n children,\r\n ...props\r\n },\r\n ref\r\n) {\r\n return (\r\n <span\r\n ref={ref}\r\n className={cx(\r\n 'brycks-badge',\r\n `brycks-badge--${variant}`,\r\n `brycks-badge--${intent}`,\r\n `brycks-badge--${size}`,\r\n className\r\n )}\r\n style={style}\r\n data-testid={testId}\r\n {...props}\r\n >\r\n {children}\r\n </span>\r\n )\r\n})\r\n\r\nBadge.displayName = 'Badge'\r\n"],"names":["Badge","forwardRef","variant","intent","size","className","style","testId","children","props","ref","
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../../src/components/utility/Badge/Badge.tsx"],"sourcesContent":["/**\r\n * Badge Component\r\n *\r\n * Small label for status, counts, or categorization.\r\n * Clean, minimal design with subtle color coding.\r\n *\r\n * All color styles are handled via CSS classes for easy customization.\r\n */\r\n\r\nimport {\r\n forwardRef,\r\n type ReactNode,\r\n type HTMLAttributes,\r\n} from 'react'\r\nimport { cx } from '../../../utils/styles'\r\n\r\nexport type BadgeVariant = 'solid' | 'subtle' | 'outline'\r\nexport type BadgeIntent = 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'error' | 'info'\r\nexport type BadgeSize = 'sm' | 'md' | 'lg'\r\n\r\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\r\n /** Visual variant */\r\n variant?: BadgeVariant\r\n /** Color intent */\r\n intent?: BadgeIntent\r\n /** Size */\r\n size?: BadgeSize\r\n /** Show a leading status dot in the intent color (a non-color status cue) */\r\n dot?: boolean\r\n /** Leading icon (e.g. a HugeIcon). Prefer this over emoji as a label icon */\r\n leftIcon?: ReactNode\r\n /** Custom class name */\r\n className?: string\r\n /** Test ID */\r\n testId?: string\r\n /** Badge content */\r\n children?: ReactNode\r\n}\r\n\r\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\r\n {\r\n variant = 'subtle',\r\n intent = 'neutral',\r\n size = 'md',\r\n dot = false,\r\n leftIcon,\r\n className,\r\n style,\r\n testId,\r\n children,\r\n ...props\r\n },\r\n ref\r\n) {\r\n const hasLeading = dot || !!leftIcon\r\n\r\n return (\r\n <span\r\n ref={ref}\r\n className={cx(\r\n 'brycks-badge',\r\n `brycks-badge--${variant}`,\r\n `brycks-badge--${intent}`,\r\n `brycks-badge--${size}`,\r\n hasLeading && 'brycks-badge--with-leading',\r\n className\r\n )}\r\n style={style}\r\n data-testid={testId}\r\n {...props}\r\n >\r\n {dot && <span className=\"brycks-badge__dot\" aria-hidden=\"true\" />}\r\n {!dot && leftIcon && <span className=\"brycks-badge__icon\">{leftIcon}</span>}\r\n {children}\r\n </span>\r\n )\r\n})\r\n\r\nBadge.displayName = 'Badge'\r\n"],"names":["Badge","forwardRef","variant","intent","size","dot","leftIcon","className","style","testId","children","props","ref","hasLeading","jsxs","cx","jsx"],"mappings":";;;AAuCO,MAAMA,IAAQC,EAAwC,SAC3D;AAAA,EACE,SAAAC,IAAU;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,KAAAC,IAAM;AAAA,EACN,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAaR,KAAO,CAAC,CAACC;AAE5B,SACE,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACA,iBAAiBb,CAAO;AAAA,QACxB,iBAAiBC,CAAM;AAAA,QACvB,iBAAiBC,CAAI;AAAA,QACrBS,KAAc;AAAA,QACdN;AAAA,MAAA;AAAA,MAEF,OAAAC;AAAA,MACA,eAAaC;AAAA,MACZ,GAAGE;AAAA,MAEH,UAAA;AAAA,QAAAN,KAAO,gBAAAW,EAAC,QAAA,EAAK,WAAU,qBAAoB,eAAY,QAAO;AAAA,QAC9D,CAACX,KAAOC,uBAAa,QAAA,EAAK,WAAU,sBAAsB,UAAAA,GAAS;AAAA,QACnEI;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AAEDV,EAAM,cAAc;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("react"),n=require("../../../utils/styles.cjs"),e=i.forwardRef(function({size:t="md",className:r,testId:s,children:d,...c},b){return a.jsx("kbd",{ref:b,className:n.cx("brycks-kbd",`brycks-kbd--${t}`,r),"data-testid":s,...c,children:d})});e.displayName="Kbd";exports.Kbd=e;
|
|
2
|
+
//# sourceMappingURL=Kbd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kbd.cjs","sources":["../../../../src/components/utility/Kbd/Kbd.tsx"],"sourcesContent":["/**\n * Kbd Component\n *\n * Renders a keyboard key or shortcut (e.g. ⌘K, Ctrl, Esc) with the semantic\n * `<kbd>` element. Use inside hints, command palettes, and shortcut lists.\n *\n * All styles are handled via CSS classes for easy customization.\n */\n\nimport {\n forwardRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type KbdSize = 'sm' | 'md'\n\nexport interface KbdProps extends HTMLAttributes<HTMLElement> {\n /** Size */\n size?: KbdSize\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n /** Key content */\n children?: ReactNode\n}\n\nexport const Kbd = forwardRef<HTMLElement, KbdProps>(function Kbd(\n { size = 'md', className, testId, children, ...props },\n ref\n) {\n return (\n <kbd\n ref={ref}\n className={cx('brycks-kbd', `brycks-kbd--${size}`, className)}\n data-testid={testId}\n {...props}\n >\n {children}\n </kbd>\n )\n})\n\nKbd.displayName = 'Kbd'\n"],"names":["Kbd","forwardRef","size","className","testId","children","props","ref","jsx","cx"],"mappings":"+KA6BaA,EAAMC,EAAAA,WAAkC,SACnD,CAAE,KAAAC,EAAO,KAAM,UAAAC,EAAW,OAAAC,EAAQ,SAAAC,EAAU,GAAGC,CAAA,EAC/CC,EACA,CACA,OACEC,EAAAA,IAAC,MAAA,CACC,IAAAD,EACA,UAAWE,EAAAA,GAAG,aAAc,eAAeP,CAAI,GAAIC,CAAS,EAC5D,cAAaC,EACZ,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP,CAAC,EAEDL,EAAI,YAAc"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as a } from "react";
|
|
3
|
+
import { cx as c } from "../../../utils/styles.js";
|
|
4
|
+
const e = a(function({ size: r = "md", className: d, testId: o, children: t, ...m }, b) {
|
|
5
|
+
return /* @__PURE__ */ s(
|
|
6
|
+
"kbd",
|
|
7
|
+
{
|
|
8
|
+
ref: b,
|
|
9
|
+
className: c("brycks-kbd", `brycks-kbd--${r}`, d),
|
|
10
|
+
"data-testid": o,
|
|
11
|
+
...m,
|
|
12
|
+
children: t
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
});
|
|
16
|
+
e.displayName = "Kbd";
|
|
17
|
+
export {
|
|
18
|
+
e as Kbd
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=Kbd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kbd.js","sources":["../../../../src/components/utility/Kbd/Kbd.tsx"],"sourcesContent":["/**\n * Kbd Component\n *\n * Renders a keyboard key or shortcut (e.g. ⌘K, Ctrl, Esc) with the semantic\n * `<kbd>` element. Use inside hints, command palettes, and shortcut lists.\n *\n * All styles are handled via CSS classes for easy customization.\n */\n\nimport {\n forwardRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type KbdSize = 'sm' | 'md'\n\nexport interface KbdProps extends HTMLAttributes<HTMLElement> {\n /** Size */\n size?: KbdSize\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n /** Key content */\n children?: ReactNode\n}\n\nexport const Kbd = forwardRef<HTMLElement, KbdProps>(function Kbd(\n { size = 'md', className, testId, children, ...props },\n ref\n) {\n return (\n <kbd\n ref={ref}\n className={cx('brycks-kbd', `brycks-kbd--${size}`, className)}\n data-testid={testId}\n {...props}\n >\n {children}\n </kbd>\n )\n})\n\nKbd.displayName = 'Kbd'\n"],"names":["Kbd","forwardRef","size","className","testId","children","props","ref","jsx","cx"],"mappings":";;;AA6BO,MAAMA,IAAMC,EAAkC,SACnD,EAAE,MAAAC,IAAO,MAAM,WAAAC,GAAW,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAA,GAC/CC,GACA;AACA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,WAAWE,EAAG,cAAc,eAAeP,CAAI,IAAIC,CAAS;AAAA,MAC5D,eAAaC;AAAA,MACZ,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AAEDL,EAAI,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),m=require("react"),y=require("../../../utils/styles.cjs"),f={sm:32,md:40,lg:56,xl:64},p={sm:14,md:18,lg:24,xl:28},b={sm:8,md:10,lg:14,xl:16},e=m.forwardRef(function({size:t="md",children:r,className:s,testId:n,style:i,...a},c){const o=f[t],d=p[t],l=b[t],u={width:o,height:o,minWidth:o,borderRadius:l,background:"var(--brycks-primary-default)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--brycks-primary-foreground)",fontWeight:700,fontSize:d,...i};return g.jsx("div",{ref:c,className:y.cx("brycks-logo",s),style:u,"data-testid":n,"aria-hidden":"true",...a,children:r})});e.displayName="Logo";exports.Logo=e;
|
|
2
2
|
//# sourceMappingURL=Logo.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.cjs","sources":["../../../../src/components/utility/Logo/Logo.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type HTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type LogoSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<LogoSize, number> = {\n sm: 32,\n md: 40,\n lg: 56,\n xl: 64,\n}\n\nconst fontSizeMap: Record<LogoSize, number> = {\n sm: 14,\n md: 18,\n lg: 24,\n xl: 28,\n}\n\nconst radiusMap: Record<LogoSize, number> = {\n sm: 8,\n md: 10,\n lg: 14,\n xl: 16,\n}\n\nexport interface LogoProps extends HTMLAttributes<HTMLDivElement> {\n /** Size of the logo */\n size?: LogoSize\n /** Content to display (usually a letter or icon) */\n children?: ReactNode\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nexport const Logo = forwardRef<HTMLDivElement, LogoProps>(\n function Logo(\n {\n size = 'md',\n children,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n const radius = radiusMap[size]\n\n const logoStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: radius,\n
|
|
1
|
+
{"version":3,"file":"Logo.cjs","sources":["../../../../src/components/utility/Logo/Logo.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type HTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type LogoSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<LogoSize, number> = {\n sm: 32,\n md: 40,\n lg: 56,\n xl: 64,\n}\n\nconst fontSizeMap: Record<LogoSize, number> = {\n sm: 14,\n md: 18,\n lg: 24,\n xl: 28,\n}\n\nconst radiusMap: Record<LogoSize, number> = {\n sm: 8,\n md: 10,\n lg: 14,\n xl: 16,\n}\n\nexport interface LogoProps extends HTMLAttributes<HTMLDivElement> {\n /** Size of the logo */\n size?: LogoSize\n /** Content to display (usually a letter or icon) */\n children?: ReactNode\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nexport const Logo = forwardRef<HTMLDivElement, LogoProps>(\n function Logo(\n {\n size = 'md',\n children,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n const radius = radiusMap[size]\n\n const logoStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: radius,\n // Flat + on-palette: solid primary, no gradient, no decorative shadow.\n background: 'var(--brycks-primary-default)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'var(--brycks-primary-foreground)',\n fontWeight: 700,\n fontSize,\n ...style,\n }\n\n return (\n <div\n ref={ref}\n className={cx('brycks-logo', className)}\n style={logoStyle}\n data-testid={testId}\n aria-hidden=\"true\"\n {...props}\n >\n {children}\n </div>\n )\n }\n)\n\nLogo.displayName = 'Logo'\n"],"names":["sizeMap","fontSizeMap","radiusMap","Logo","forwardRef","size","children","className","testId","style","props","ref","dimension","fontSize","radius","logoStyle","jsx","cx"],"mappings":"+KAKMA,EAAoC,CACxC,GAAI,GACJ,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAEMC,EAAwC,CAC5C,GAAI,GACJ,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAEMC,EAAsC,CAC1C,GAAI,EACJ,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAaaC,EAAOC,EAAAA,WAClB,SACE,CACE,KAAAC,EAAO,KACP,SAAAC,EACA,UAAAC,EACA,OAAAC,EACA,MAAAC,EACA,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAYZ,EAAQK,CAAI,EACxBQ,EAAWZ,EAAYI,CAAI,EAC3BS,EAASZ,EAAUG,CAAI,EAEvBU,EAA2B,CAC/B,MAAOH,EACP,OAAQA,EACR,SAAUA,EACV,aAAcE,EAEd,WAAY,gCACZ,QAAS,OACT,WAAY,SACZ,eAAgB,SAChB,MAAO,mCACP,WAAY,IACZ,SAAAD,EACA,GAAGJ,CAAA,EAGL,OACEO,EAAAA,IAAC,MAAA,CACC,IAAAL,EACA,UAAWM,EAAAA,GAAG,cAAeV,CAAS,EACtC,MAAOQ,EACP,cAAaP,EACb,cAAY,OACX,GAAGE,EAEH,SAAAJ,CAAA,CAAA,CAGP,CACF,EAEAH,EAAK,YAAc"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cx as
|
|
4
|
-
const
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { cx as g } from "../../../utils/styles.js";
|
|
4
|
+
const p = {
|
|
5
5
|
sm: 32,
|
|
6
6
|
md: 40,
|
|
7
7
|
lg: 56,
|
|
8
8
|
xl: 64
|
|
9
|
-
},
|
|
9
|
+
}, u = {
|
|
10
10
|
sm: 14,
|
|
11
11
|
md: 18,
|
|
12
12
|
lg: 24,
|
|
@@ -16,46 +16,46 @@ const f = {
|
|
|
16
16
|
md: 10,
|
|
17
17
|
lg: 14,
|
|
18
18
|
xl: 16
|
|
19
|
-
},
|
|
19
|
+
}, x = f(
|
|
20
20
|
function({
|
|
21
21
|
size: o = "md",
|
|
22
22
|
children: r,
|
|
23
|
-
className:
|
|
23
|
+
className: s,
|
|
24
24
|
testId: i,
|
|
25
|
-
style:
|
|
26
|
-
...
|
|
27
|
-
},
|
|
28
|
-
const t =
|
|
25
|
+
style: n,
|
|
26
|
+
...e
|
|
27
|
+
}, a) {
|
|
28
|
+
const t = p[o], d = u[o], m = y[o], c = {
|
|
29
29
|
width: t,
|
|
30
30
|
height: t,
|
|
31
31
|
minWidth: t,
|
|
32
32
|
borderRadius: m,
|
|
33
|
-
|
|
33
|
+
// Flat + on-palette: solid primary, no gradient, no decorative shadow.
|
|
34
|
+
background: "var(--brycks-primary-default)",
|
|
34
35
|
display: "flex",
|
|
35
36
|
alignItems: "center",
|
|
36
37
|
justifyContent: "center",
|
|
37
|
-
color: "
|
|
38
|
+
color: "var(--brycks-primary-foreground)",
|
|
38
39
|
fontWeight: 700,
|
|
39
40
|
fontSize: d,
|
|
40
|
-
|
|
41
|
-
...a
|
|
41
|
+
...n
|
|
42
42
|
};
|
|
43
43
|
return /* @__PURE__ */ l(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
|
-
ref:
|
|
47
|
-
className:
|
|
46
|
+
ref: a,
|
|
47
|
+
className: g("brycks-logo", s),
|
|
48
48
|
style: c,
|
|
49
49
|
"data-testid": i,
|
|
50
50
|
"aria-hidden": "true",
|
|
51
|
-
...
|
|
51
|
+
...e,
|
|
52
52
|
children: r
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
|
-
|
|
57
|
+
x.displayName = "Logo";
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
x as Logo
|
|
60
60
|
};
|
|
61
61
|
//# sourceMappingURL=Logo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.js","sources":["../../../../src/components/utility/Logo/Logo.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type HTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type LogoSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<LogoSize, number> = {\n sm: 32,\n md: 40,\n lg: 56,\n xl: 64,\n}\n\nconst fontSizeMap: Record<LogoSize, number> = {\n sm: 14,\n md: 18,\n lg: 24,\n xl: 28,\n}\n\nconst radiusMap: Record<LogoSize, number> = {\n sm: 8,\n md: 10,\n lg: 14,\n xl: 16,\n}\n\nexport interface LogoProps extends HTMLAttributes<HTMLDivElement> {\n /** Size of the logo */\n size?: LogoSize\n /** Content to display (usually a letter or icon) */\n children?: ReactNode\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nexport const Logo = forwardRef<HTMLDivElement, LogoProps>(\n function Logo(\n {\n size = 'md',\n children,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n const radius = radiusMap[size]\n\n const logoStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: radius,\n
|
|
1
|
+
{"version":3,"file":"Logo.js","sources":["../../../../src/components/utility/Logo/Logo.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode, type HTMLAttributes } from 'react'\nimport { cx } from '../../../utils/styles'\n\nexport type LogoSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeMap: Record<LogoSize, number> = {\n sm: 32,\n md: 40,\n lg: 56,\n xl: 64,\n}\n\nconst fontSizeMap: Record<LogoSize, number> = {\n sm: 14,\n md: 18,\n lg: 24,\n xl: 28,\n}\n\nconst radiusMap: Record<LogoSize, number> = {\n sm: 8,\n md: 10,\n lg: 14,\n xl: 16,\n}\n\nexport interface LogoProps extends HTMLAttributes<HTMLDivElement> {\n /** Size of the logo */\n size?: LogoSize\n /** Content to display (usually a letter or icon) */\n children?: ReactNode\n /** Custom class name */\n className?: string\n /** Test ID */\n testId?: string\n}\n\nexport const Logo = forwardRef<HTMLDivElement, LogoProps>(\n function Logo(\n {\n size = 'md',\n children,\n className,\n testId,\n style,\n ...props\n },\n ref\n ) {\n const dimension = sizeMap[size]\n const fontSize = fontSizeMap[size]\n const radius = radiusMap[size]\n\n const logoStyle: CSSProperties = {\n width: dimension,\n height: dimension,\n minWidth: dimension,\n borderRadius: radius,\n // Flat + on-palette: solid primary, no gradient, no decorative shadow.\n background: 'var(--brycks-primary-default)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'var(--brycks-primary-foreground)',\n fontWeight: 700,\n fontSize,\n ...style,\n }\n\n return (\n <div\n ref={ref}\n className={cx('brycks-logo', className)}\n style={logoStyle}\n data-testid={testId}\n aria-hidden=\"true\"\n {...props}\n >\n {children}\n </div>\n )\n }\n)\n\nLogo.displayName = 'Logo'\n"],"names":["sizeMap","fontSizeMap","radiusMap","Logo","forwardRef","size","children","className","testId","style","props","ref","dimension","fontSize","radius","logoStyle","jsx","cx"],"mappings":";;;AAKA,MAAMA,IAAoC;AAAA,EACxC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAwC;AAAA,EAC5C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAsC;AAAA,EAC1C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAaaC,IAAOC;AAAA,EAClB,SACE;AAAA,IACE,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAMC,IAAYZ,EAAQK,CAAI,GACxBQ,IAAWZ,EAAYI,CAAI,GAC3BS,IAASZ,EAAUG,CAAI,GAEvBU,IAA2B;AAAA,MAC/B,OAAOH;AAAA,MACP,QAAQA;AAAA,MACR,UAAUA;AAAA,MACV,cAAcE;AAAA;AAAA,MAEd,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,UAAAD;AAAA,MACA,GAAGJ;AAAA,IAAA;AAGL,WACE,gBAAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAL;AAAA,QACA,WAAWM,EAAG,eAAeV,CAAS;AAAA,QACtC,OAAOQ;AAAA,QACP,eAAaP;AAAA,QACb,eAAY;AAAA,QACX,GAAGE;AAAA,QAEH,UAAAJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAH,EAAK,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./utility/Badge/Badge.cjs"),e=require("./utility/Loader/Loader.cjs"),r=require("./utility/Skeleton/Skeleton.cjs"),a=require("./utility/Divider/Divider.cjs"),t=require("./utility/EmptyState/EmptyState.cjs"),i=require("./utility/Portal/Portal.cjs"),c=require("./utility/FocusTrap/FocusTrap.cjs"),l=require("./utility/Overlay/Overlay.cjs"),o=require("./utility/ScreenReaderOnly/ScreenReaderOnly.cjs"),S=require("./utility/Avatar/Avatar.cjs"),u=require("./utility/Logo/Logo.cjs");exports.Badge=n.Badge;exports.Loader=e.Loader;exports.Spinner=e.Spinner;exports.Skeleton=r.Skeleton;exports.SkeletonText=r.SkeletonText;exports.Divider=a.Divider;exports.EmptyState=t.EmptyState;exports.EmptyStateIcon=t.EmptyStateIcon;exports.Portal=i.Portal;exports.FocusTrap=c.FocusTrap;exports.Overlay=l.Overlay;exports.ScreenReaderOnly=o.ScreenReaderOnly;exports.SrOnly=o.SrOnly;exports.Avatar=S.Avatar;exports.Logo=u.Logo;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./utility/Badge/Badge.cjs"),e=require("./utility/Loader/Loader.cjs"),r=require("./utility/Skeleton/Skeleton.cjs"),a=require("./utility/Divider/Divider.cjs"),t=require("./utility/EmptyState/EmptyState.cjs"),i=require("./utility/Portal/Portal.cjs"),c=require("./utility/FocusTrap/FocusTrap.cjs"),l=require("./utility/Overlay/Overlay.cjs"),o=require("./utility/ScreenReaderOnly/ScreenReaderOnly.cjs"),S=require("./utility/Avatar/Avatar.cjs"),u=require("./utility/Logo/Logo.cjs"),d=require("./utility/Kbd/Kbd.cjs");exports.Badge=n.Badge;exports.Loader=e.Loader;exports.Spinner=e.Spinner;exports.Skeleton=r.Skeleton;exports.SkeletonText=r.SkeletonText;exports.Divider=a.Divider;exports.EmptyState=t.EmptyState;exports.EmptyStateIcon=t.EmptyStateIcon;exports.Portal=i.Portal;exports.FocusTrap=c.FocusTrap;exports.Overlay=l.Overlay;exports.ScreenReaderOnly=o.ScreenReaderOnly;exports.SrOnly=o.SrOnly;exports.Avatar=S.Avatar;exports.Logo=u.Logo;exports.Kbd=d.Kbd;
|
|
2
2
|
//# sourceMappingURL=utility.cjs.map
|
|
@@ -2,22 +2,24 @@ import { Badge as e } from "./utility/Badge/Badge.js";
|
|
|
2
2
|
import { Loader as p, Spinner as m } from "./utility/Loader/Loader.js";
|
|
3
3
|
import { Skeleton as f, SkeletonText as a } from "./utility/Skeleton/Skeleton.js";
|
|
4
4
|
import { Divider as S } from "./utility/Divider/Divider.js";
|
|
5
|
-
import { EmptyState as
|
|
5
|
+
import { EmptyState as d, EmptyStateIcon as y } from "./utility/EmptyState/EmptyState.js";
|
|
6
6
|
import { Portal as i } from "./utility/Portal/Portal.js";
|
|
7
7
|
import { FocusTrap as O } from "./utility/FocusTrap/FocusTrap.js";
|
|
8
8
|
import { Overlay as k } from "./utility/Overlay/Overlay.js";
|
|
9
9
|
import { ScreenReaderOnly as L, SrOnly as T } from "./utility/ScreenReaderOnly/ScreenReaderOnly.js";
|
|
10
|
-
import { Avatar as
|
|
11
|
-
import { Logo as
|
|
10
|
+
import { Avatar as s } from "./utility/Avatar/Avatar.js";
|
|
11
|
+
import { Logo as A } from "./utility/Logo/Logo.js";
|
|
12
|
+
import { Kbd as D } from "./utility/Kbd/Kbd.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
s as Avatar,
|
|
14
15
|
e as Badge,
|
|
15
16
|
S as Divider,
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
d as EmptyState,
|
|
18
|
+
y as EmptyStateIcon,
|
|
18
19
|
O as FocusTrap,
|
|
20
|
+
D as Kbd,
|
|
19
21
|
p as Loader,
|
|
20
|
-
|
|
22
|
+
A as Logo,
|
|
21
23
|
k as Overlay,
|
|
22
24
|
i as Portal,
|
|
23
25
|
L as ScreenReaderOnly,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utility.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/dist/data.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { ForwardRefExoticComponent } from 'react';
|
|
3
3
|
import { HTMLAttributes } from 'react';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
5
|
import { ReactNode } from 'react';
|
|
5
6
|
import { RefAttributes } from 'react';
|
|
6
7
|
import { TdHTMLAttributes } from 'react';
|
|
@@ -135,6 +136,23 @@ export declare interface TableCellProps extends TdHTMLAttributes<HTMLTableCellEl
|
|
|
135
136
|
className?: string;
|
|
136
137
|
}
|
|
137
138
|
|
|
139
|
+
export declare const TableEmpty: ForwardRefExoticComponent<TableEmptyProps & RefAttributes<HTMLTableRowElement>>;
|
|
140
|
+
|
|
141
|
+
export declare interface TableEmptyProps {
|
|
142
|
+
/** Number of columns to span (match the table's column count) */
|
|
143
|
+
colSpan: number;
|
|
144
|
+
/** Icon or illustration */
|
|
145
|
+
icon?: ReactNode;
|
|
146
|
+
/** Title text */
|
|
147
|
+
title?: ReactNode;
|
|
148
|
+
/** Description text */
|
|
149
|
+
description?: ReactNode;
|
|
150
|
+
/** Action element (button, link) */
|
|
151
|
+
action?: ReactNode;
|
|
152
|
+
/** Custom class name */
|
|
153
|
+
className?: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
138
156
|
export declare const TableFoot: ForwardRefExoticComponent<TableFootProps & RefAttributes<HTMLTableSectionElement>>;
|
|
139
157
|
|
|
140
158
|
export declare interface TableFootProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
@@ -194,7 +212,22 @@ export declare interface TableRowProps extends HTMLAttributes<HTMLTableRowElemen
|
|
|
194
212
|
|
|
195
213
|
export declare type TableSize = 'sm' | 'md' | 'lg';
|
|
196
214
|
|
|
197
|
-
export declare
|
|
215
|
+
export declare function TableSkeleton({ rows, columns, className }: TableSkeletonProps): JSX.Element;
|
|
216
|
+
|
|
217
|
+
export declare namespace TableSkeleton {
|
|
218
|
+
var displayName: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export declare interface TableSkeletonProps {
|
|
222
|
+
/** Number of skeleton rows */
|
|
223
|
+
rows?: number;
|
|
224
|
+
/** Number of columns per row (match the table's column count) */
|
|
225
|
+
columns: number;
|
|
226
|
+
/** Custom class name applied to each row */
|
|
227
|
+
className?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare type TableVariant = 'default' | 'bordered';
|
|
198
231
|
|
|
199
232
|
export declare interface TreeNode {
|
|
200
233
|
/** Unique identifier */
|
package/dist/feedback.d.ts
CHANGED
|
@@ -39,6 +39,71 @@ export declare interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
39
39
|
|
|
40
40
|
export declare type AlertVariant = 'subtle' | 'solid' | 'outline';
|
|
41
41
|
|
|
42
|
+
export declare const Banner: default_2.ForwardRefExoticComponent<BannerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
|
|
44
|
+
export declare type BannerIntent = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
45
|
+
|
|
46
|
+
export declare interface BannerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
47
|
+
/** Visual intent/status */
|
|
48
|
+
intent?: BannerIntent;
|
|
49
|
+
/** Banner title (stronger weight, sits above the description) */
|
|
50
|
+
title?: ReactNode;
|
|
51
|
+
/** Custom icon (overrides the default per-intent icon) */
|
|
52
|
+
icon?: ReactNode;
|
|
53
|
+
/** Whether to show the leading icon */
|
|
54
|
+
showIcon?: boolean;
|
|
55
|
+
/** Action element (button, link) shown on the trailing edge */
|
|
56
|
+
action?: ReactNode;
|
|
57
|
+
/** Whether the banner can be dismissed */
|
|
58
|
+
isDismissible?: boolean;
|
|
59
|
+
/** Callback when dismissed */
|
|
60
|
+
onDismiss?: () => void;
|
|
61
|
+
/** Accessible label of the dismiss button */
|
|
62
|
+
dismissLabel?: string;
|
|
63
|
+
/**
|
|
64
|
+
* ARIA live-region role. Defaults to `alert` for warning/error and
|
|
65
|
+
* `status` for info/success/neutral. Override when the default is wrong.
|
|
66
|
+
*/
|
|
67
|
+
role?: 'alert' | 'status';
|
|
68
|
+
/** Custom class name */
|
|
69
|
+
className?: string;
|
|
70
|
+
/** Test ID */
|
|
71
|
+
testId?: string;
|
|
72
|
+
/** Banner content (description) */
|
|
73
|
+
children?: ReactNode;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export declare const ConfirmDialog: ForwardRefExoticComponent<ConfirmDialogProps & RefAttributes<HTMLDivElement>>;
|
|
77
|
+
|
|
78
|
+
export declare interface ConfirmDialogProps {
|
|
79
|
+
/** Whether the dialog is open */
|
|
80
|
+
isOpen: boolean;
|
|
81
|
+
/** Callback when the dialog should close (cancel / overlay / escape) */
|
|
82
|
+
onClose: () => void;
|
|
83
|
+
/** Callback when the user confirms */
|
|
84
|
+
onConfirm: () => void;
|
|
85
|
+
/** Dialog title */
|
|
86
|
+
title: ReactNode;
|
|
87
|
+
/** Body message (use `children` for richer content) */
|
|
88
|
+
message?: ReactNode;
|
|
89
|
+
/** Label of the confirm button */
|
|
90
|
+
confirmLabel?: string;
|
|
91
|
+
/** Label of the cancel button */
|
|
92
|
+
cancelLabel?: string;
|
|
93
|
+
/** Accessible label of the modal close button */
|
|
94
|
+
closeLabel?: string;
|
|
95
|
+
/** Visual variant — `danger` for destructive actions */
|
|
96
|
+
variant?: ConfirmDialogVariant;
|
|
97
|
+
/** Whether the confirm action is in progress (disables cancel, spins confirm) */
|
|
98
|
+
isLoading?: boolean;
|
|
99
|
+
/** Test ID */
|
|
100
|
+
testId?: string;
|
|
101
|
+
/** Richer body content (rendered below `message`) */
|
|
102
|
+
children?: ReactNode;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export declare type ConfirmDialogVariant = 'default' | 'danger';
|
|
106
|
+
|
|
42
107
|
export declare const Drawer: ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLDivElement>>;
|
|
43
108
|
|
|
44
109
|
export declare type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
@@ -93,6 +158,8 @@ export declare interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
93
158
|
showCloseButton?: boolean;
|
|
94
159
|
/** Accessible label of the close button */
|
|
95
160
|
closeLabel?: string;
|
|
161
|
+
/** Footer content (e.g. action buttons), pinned below the scrollable body */
|
|
162
|
+
footer?: ReactNode;
|
|
96
163
|
/** Custom class name */
|
|
97
164
|
className?: string;
|
|
98
165
|
/** Test ID */
|
|
@@ -130,8 +197,6 @@ export declare interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement
|
|
|
130
197
|
closeDelay?: number;
|
|
131
198
|
/** Whether to close on outside click */
|
|
132
199
|
closeOnOutsideClick?: boolean;
|
|
133
|
-
/** Whether to show arrow */
|
|
134
|
-
showArrow?: boolean;
|
|
135
200
|
/** Custom class name for content */
|
|
136
201
|
className?: string;
|
|
137
202
|
/** Test ID */
|