@espressif/dashboard-ui-components 1.13.0 → 1.14.1
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/.claude/rules/dashboard-ui-consumption.md +42 -0
- package/.cursor/rules/dashboard-ui-consumption.mdc +40 -1
- package/CHANGELOG.md +272 -0
- package/README.md +68 -6
- package/dist/{alert.props-CcKo49Rb.d.ts → alert.props-BuLuWmXA.d.ts} +3 -3
- package/dist/common/copyright-card/copyright-card.js +1 -1
- package/dist/common/footer-card/footer-card.js +2 -2
- package/dist/common/index.d.ts +3 -0
- package/dist/common/my-account-menu/my-account-menu.js +2 -2
- package/dist/common/page-loader/page-loader.js +4 -1
- package/dist/common/profile-card/profile-card.js +2 -2
- package/dist/components/accordion/accordion.js +6 -11
- package/dist/components/alert/index.d.ts +5 -5
- package/dist/components/anchored-panel/anchored-panel.js +4 -4
- package/dist/components/async-multi-select/async-multi-select.js +8 -8
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/bottom-sheet/_hooks/use-sheet-drag.js +112 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +84 -0
- package/dist/components/bottom-sheet/index.d.ts +50 -0
- package/dist/components/bottom-sheet/index.js +3 -0
- package/dist/components/bubble/bubble.js +1 -1
- package/dist/components/button/button.js +2 -2
- package/dist/components/button/flash-button.js +4 -4
- package/dist/components/calendar/calendar.js +5 -5
- package/dist/components/cards/animated-card/animated-card.js +1 -1
- package/dist/components/cards/basic-details-card.js +2 -2
- package/dist/components/cards/collapsible-card.js +1 -1
- package/dist/components/cards/index.d.ts +2 -2
- package/dist/components/cards/no-data-card/no-data-card.js +2 -2
- package/dist/components/cards/section-card.js +12 -12
- package/dist/components/cards/simple-card.js +2 -5
- package/dist/components/category-card/category-card.js +2 -2
- package/dist/components/chart/chart.js +4 -4
- package/dist/components/chart/donut-chart.js +1 -1
- package/dist/components/chart/treemap-chart.js +1 -1
- package/dist/components/choice-card/choice-card.js +3 -3
- package/dist/components/code-editor/code-editor.js +4 -3
- package/dist/components/data-table/table-header.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +3 -3
- package/dist/components/dynamic-list/dynamic-list.js +14 -13
- package/dist/components/dynamic-list/index.d.ts +1 -1
- package/dist/components/error-display/full-size-error/full-size-error.js +2 -2
- package/dist/components/expandable-text/expandable-text-overlay.js +1 -1
- package/dist/components/facet-filters/filter-group.js +2 -2
- package/dist/components/feature-grid/feature-grid.js +3 -3
- package/dist/components/file-input/file-input.js +8 -8
- package/dist/components/file-upload/file-upload.js +4 -4
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +1 -1
- package/dist/components/gradient-ring-button/_hooks/use-ring-geometry.js +116 -0
- package/dist/components/gradient-ring-button/gradient-ring-button.js +44 -0
- package/dist/components/gradient-ring-button/gradient-ring.js +77 -0
- package/dist/components/gradient-ring-button/index.d.ts +66 -0
- package/dist/components/gradient-ring-button/index.js +3 -0
- package/dist/components/horizontal-stepper/horizontal-stepper.js +4 -8
- package/dist/components/horizontal-stepper/index.d.ts +1 -1
- package/dist/components/icon-avatar/index.d.ts +3 -3
- package/dist/components/icon-text-action-card/index.d.ts +4 -4
- package/dist/components/index.d.ts +9 -7
- package/dist/components/index.js +5 -1
- package/dist/components/key-value-manager/key-value-manager-add-popover.js +1 -1
- package/dist/components/key-value-manager/key-value-manager-table.js +1 -1
- package/dist/components/link/link.js +7 -7
- package/dist/components/list/list-item.utils.js +5 -4
- package/dist/components/list/list.js +1 -1
- package/dist/components/list-details/index.d.ts +2 -2
- package/dist/components/markdown-content/markdown-content.components.js +2 -2
- package/dist/components/media-card/media-card-reveal.js +2 -2
- package/dist/components/media-card/media-card.js +2 -2
- package/dist/components/monospace-content/index.d.ts +4 -4
- package/dist/components/monospace-content/monospace-content.js +9 -11
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +3 -3
- package/dist/components/nav-bar/nav-bar.js +4 -4
- package/dist/components/notice-strip/notice-strip.js +1 -1
- package/dist/components/option-card-group/option-card-group.js +2 -2
- package/dist/components/overflow-badge-list/index.d.ts +2 -2
- package/dist/components/overflow-badge-list/overflow-badge-list.js +3 -3
- package/dist/components/page-banner/page-banner.js +1 -1
- package/dist/components/page-container/page-container.js +1 -1
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/qr-code/qr-code.js +2 -2
- package/dist/components/radio-group/radio-group.js +3 -3
- package/dist/components/range-field/range-field.js +9 -12
- package/dist/components/readout/readout.js +1 -1
- package/dist/components/requirement-list/requirement-list.js +5 -10
- package/dist/components/scrollable-sections/scrollable-sections.js +1 -1
- package/dist/components/search-field-shell.js +8 -8
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +6 -6
- package/dist/components/showcase-card/showcase-card.js +2 -2
- package/dist/components/sidebar/sidebar.js +13 -15
- package/dist/components/simple-clickable-card/index.d.ts +4 -4
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +17 -23
- package/dist/components/simple-info-card/index.d.ts +3 -3
- package/dist/components/simple-list/index.d.ts +1 -1
- package/dist/components/simple-list/simple-list.js +8 -8
- package/dist/components/simple-paginated-list/simple-paginated-list.js +1 -4
- package/dist/components/stat-card/stat-card.js +7 -13
- package/dist/components/status-badge/index.d.ts +3 -3
- package/dist/components/status-badge/status-badge.js +4 -4
- package/dist/components/status-card-list/status-card-list.js +6 -6
- package/dist/components/tag/index.d.ts +1 -1
- package/dist/components/tag/tag.js +4 -4
- package/dist/components/tag-input/tag-input.js +12 -12
- package/dist/components/timeline/timeline.js +2 -2
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/toast.js +2 -2
- package/dist/components/toolbar/index.d.ts +5 -2
- package/dist/components/toolbar/toolbar-button.js +1 -1
- package/dist/components/toolbar/toolbar.js +9 -3
- package/dist/components/trace/trace.js +1 -1
- package/dist/components/transfer-list/transfer-list.js +2 -2
- package/dist/components/typography/index.d.ts +12 -3
- package/dist/components/typography/typography-variants.js +98 -13
- package/dist/components/typography/typography.js +4 -2
- package/dist/components/user-type-badge/user-type-badge.js +4 -4
- package/dist/components/vertical-stepper/vertical-stepper.js +11 -7
- package/dist/core/alert.js +3 -3
- package/dist/core/animate-ui/components/animate/code-header.js +1 -1
- package/dist/core/animate-ui/components/animate/code.js +1 -1
- package/dist/core/animate-ui/components/animate/tabs.js +6 -6
- package/dist/core/animate-ui/components/animate/tooltip.js +1 -1
- package/dist/core/animate-ui/components/base/progress.js +2 -2
- package/dist/core/animate-ui/components/radix/accordion.js +2 -2
- package/dist/core/animate-ui/components/radix/dialog.js +2 -2
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +6 -6
- package/dist/core/animate-ui/components/radix/sheet.js +2 -2
- package/dist/core/animate-ui/components/radix/sidebar.js +8 -8
- package/dist/core/animate-ui/components/radix/toggle-group.js +4 -4
- package/dist/core/animate-ui/components/radix/toggle.js +1 -1
- package/dist/core/animate-ui/primitives/animate/tooltip.js +3 -0
- package/dist/core/badge.js +1 -1
- package/dist/core/breadcrumb.js +1 -1
- package/dist/core/button/button.js +2 -2
- package/dist/core/button/craft-button.js +4 -4
- package/dist/core/button-group.js +1 -1
- package/dist/core/button.js +2 -2
- package/dist/core/card.js +2 -2
- package/dist/core/combobox/combobox.js +3 -3
- package/dist/core/command.js +5 -5
- package/dist/core/field-label-row.js +4 -4
- package/dist/core/form.js +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/input/input.js +11 -11
- package/dist/core/input-otp/input-otp.js +12 -12
- package/dist/core/label.js +1 -1
- package/dist/core/select.js +6 -6
- package/dist/core/separator.js +1 -1
- package/dist/core/table.js +2 -2
- package/dist/core/textarea/textarea.js +9 -9
- package/dist/{icon-avatar.props-RYtw2eSW.d.ts → icon-avatar.props-BJe0-vva.d.ts} +1 -1
- package/dist/{icon-text-action-card.props-B2ggncUK.d.ts → icon-text-action-card.props-BU7yFi2Q.d.ts} +2 -2
- package/dist/index.d.ts +9 -7
- package/dist/index.js +6 -2
- package/dist/layouts/entry-layout/entry-layout.js +1 -1
- package/dist/layouts/index.d.ts +21 -6
- package/dist/layouts/index.js +1 -1
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +10 -18
- package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +35 -7
- package/dist/layouts/workspace-layout/footer/footer.js +1 -1
- package/dist/markdown/index.d.ts +4 -4
- package/dist/{section-card-B7c5uc08.d.ts → section-card-DqQeQkzU.d.ts} +1 -1
- package/dist/{simple-clickable-card.props-BrPCw7CR.d.ts → simple-clickable-card.props-BhhotZMp.d.ts} +2 -2
- package/dist/{status-badge.props-lKlEOfRt.d.ts → status-badge.props-BVe8CmQZ.d.ts} +1 -1
- package/dist/styles/type-scale.js +153 -0
- package/dist/tailwind-preset.js +120 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/utils/cn.js +16 -5
- package/dist/utils/color.js +10 -1
- package/dist/utils/index.d.ts +37 -3
- package/dist/utils/index.js +2 -1
- package/dist/utils/variant.js +76 -76
- package/dist/{variant-D81RhpbR.d.ts → variant-DjdaxfIA.d.ts} +6 -1
- package/package.json +6 -2
- package/src/styles/colors.css +23 -2
- package/src/styles/theme.css +8 -3
- package/src/styles/type-scale.css +152 -0
- package/tailwind.preset.ts +23 -0
|
@@ -20,14 +20,18 @@ var AVATAR_SIZE = {
|
|
|
20
20
|
icon: "h-6 w-6"
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Text roles, the same at every `size` (size moves gaps and icon sizes only):
|
|
25
|
+
* the item's label is a field label, a row item's value is running text.
|
|
26
|
+
*/
|
|
27
|
+
var LABEL_TYPOGRAPHY = "type-label";
|
|
28
|
+
var ROW_VALUE_TYPOGRAPHY = "type-body";
|
|
23
29
|
var LIST_SIZE_STYLES = {
|
|
24
30
|
sm: {
|
|
25
31
|
listGap: "gap-4",
|
|
26
32
|
rowGap: "gap-3",
|
|
27
33
|
rowGapFromSm: "sm:gap-3",
|
|
28
34
|
itemGap: "gap-1.5",
|
|
29
|
-
labelTypography: "text-xs font-medium",
|
|
30
|
-
rowValueTypography: "text-xs",
|
|
31
35
|
inlineIcon: "h-3.5 w-3.5 shrink-0",
|
|
32
36
|
avatarFallbackTypography: "text-[10px]"
|
|
33
37
|
},
|
|
@@ -36,8 +40,6 @@ var LIST_SIZE_STYLES = {
|
|
|
36
40
|
rowGap: "gap-4",
|
|
37
41
|
rowGapFromSm: "sm:gap-4",
|
|
38
42
|
itemGap: "gap-2",
|
|
39
|
-
labelTypography: "text-sm font-medium",
|
|
40
|
-
rowValueTypography: "text-sm",
|
|
41
43
|
inlineIcon: "h-4 w-4 shrink-0",
|
|
42
44
|
avatarFallbackTypography: "text-xs"
|
|
43
45
|
},
|
|
@@ -46,8 +48,6 @@ var LIST_SIZE_STYLES = {
|
|
|
46
48
|
rowGap: "gap-5",
|
|
47
49
|
rowGapFromSm: "sm:gap-5",
|
|
48
50
|
itemGap: "gap-3",
|
|
49
|
-
labelTypography: "text-base font-medium",
|
|
50
|
-
rowValueTypography: "text-base",
|
|
51
51
|
inlineIcon: "h-[18px] w-[18px] shrink-0",
|
|
52
52
|
avatarFallbackTypography: "text-sm"
|
|
53
53
|
}
|
|
@@ -90,7 +90,7 @@ function ItemRow({ item, effectiveDirection, iconStyle, avatarSize, size }) {
|
|
|
90
90
|
})
|
|
91
91
|
}) : null;
|
|
92
92
|
const labelNode = /* @__PURE__ */ jsx(Label, {
|
|
93
|
-
className:
|
|
93
|
+
className: LABEL_TYPOGRAPHY,
|
|
94
94
|
children: inlineIconNode != null ? /* @__PURE__ */ jsxs("span", {
|
|
95
95
|
className: "flex items-center gap-2",
|
|
96
96
|
children: [inlineIconNode, /* @__PURE__ */ jsx("span", { children: item.label })]
|
|
@@ -111,7 +111,7 @@ function ItemRow({ item, effectiveDirection, iconStyle, avatarSize, size }) {
|
|
|
111
111
|
className: "shrink-0",
|
|
112
112
|
children: labelNode
|
|
113
113
|
}), /* @__PURE__ */ jsx("div", {
|
|
114
|
-
className: cn("min-w-0 flex sm:flex-1 sm:justify-end",
|
|
114
|
+
className: cn("min-w-0 flex sm:flex-1 sm:justify-end", ROW_VALUE_TYPOGRAPHY),
|
|
115
115
|
children: item.content
|
|
116
116
|
})]
|
|
117
117
|
})]
|
|
@@ -11,21 +11,18 @@ var SIZE_STYLES = {
|
|
|
11
11
|
rowPad: "py-2",
|
|
12
12
|
insetX: "px-2",
|
|
13
13
|
gap: "gap-2",
|
|
14
|
-
label: "text-xs",
|
|
15
14
|
icon: "h-3.5 w-3.5 shrink-0"
|
|
16
15
|
},
|
|
17
16
|
default: {
|
|
18
17
|
rowPad: "py-3",
|
|
19
18
|
insetX: "px-2",
|
|
20
19
|
gap: "gap-3",
|
|
21
|
-
label: "text-sm",
|
|
22
20
|
icon: "h-4 w-4 shrink-0"
|
|
23
21
|
},
|
|
24
22
|
lg: {
|
|
25
23
|
rowPad: "py-4",
|
|
26
24
|
insetX: "px-3",
|
|
27
25
|
gap: "gap-4",
|
|
28
|
-
label: "text-base",
|
|
29
26
|
icon: "h-5 w-5 shrink-0"
|
|
30
27
|
}
|
|
31
28
|
};
|
|
@@ -83,7 +80,7 @@ function ListRow({ item, showBorder, styles }) {
|
|
|
83
80
|
children: renderSizedIcon(item.icon, styles.icon)
|
|
84
81
|
}) : null,
|
|
85
82
|
/* @__PURE__ */ jsx("span", {
|
|
86
|
-
className:
|
|
83
|
+
className: "min-w-0 flex-1 truncate type-body",
|
|
87
84
|
children: item.label
|
|
88
85
|
}),
|
|
89
86
|
item.action != null ? /* @__PURE__ */ jsx("span", {
|
|
@@ -40,10 +40,8 @@ var SIZE_STYLES = {
|
|
|
40
40
|
headerGap: "gap-3",
|
|
41
41
|
avatar: 40,
|
|
42
42
|
icon: "size-5",
|
|
43
|
-
heading: "text-base",
|
|
44
43
|
value: "text-2xl",
|
|
45
|
-
|
|
46
|
-
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-2.5 py-0.5 text-xs",
|
|
44
|
+
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-2.5 py-0.5 type-caption",
|
|
47
45
|
info: "size-7 [&_svg]:size-4",
|
|
48
46
|
visual: "h-7"
|
|
49
47
|
},
|
|
@@ -53,10 +51,8 @@ var SIZE_STYLES = {
|
|
|
53
51
|
headerGap: "gap-3",
|
|
54
52
|
avatar: 52,
|
|
55
53
|
icon: "size-6",
|
|
56
|
-
heading: "text-xl",
|
|
57
54
|
value: "text-3xl",
|
|
58
|
-
|
|
59
|
-
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3 py-1 text-sm",
|
|
55
|
+
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3 py-1 type-caption",
|
|
60
56
|
info: "size-8 [&_svg]:size-5",
|
|
61
57
|
visual: "h-8"
|
|
62
58
|
},
|
|
@@ -66,10 +62,8 @@ var SIZE_STYLES = {
|
|
|
66
62
|
headerGap: "gap-4",
|
|
67
63
|
avatar: 60,
|
|
68
64
|
icon: "size-7",
|
|
69
|
-
heading: "text-2xl",
|
|
70
65
|
value: "text-4xl",
|
|
71
|
-
|
|
72
|
-
badge: "gap-1.5 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3.5 py-1 text-base",
|
|
66
|
+
badge: "gap-1.5 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3.5 py-1 type-caption",
|
|
73
67
|
info: "size-9 [&_svg]:size-6",
|
|
74
68
|
visual: "h-10"
|
|
75
69
|
}
|
|
@@ -164,8 +158,8 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
164
158
|
children: renderSizedIcon(icon, s.icon)
|
|
165
159
|
}) : null, /* @__PURE__ */ jsx(Typography, {
|
|
166
160
|
as: "div",
|
|
167
|
-
variant: "
|
|
168
|
-
className:
|
|
161
|
+
variant: "heading",
|
|
162
|
+
className: "font-medium leading-tight",
|
|
169
163
|
children: heading
|
|
170
164
|
})]
|
|
171
165
|
}),
|
|
@@ -179,13 +173,13 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
179
173
|
className: cn("flex w-full items-end", s.visual),
|
|
180
174
|
children: visual
|
|
181
175
|
}) : null, caption != null ? /* @__PURE__ */ jsx("div", {
|
|
182
|
-
className:
|
|
176
|
+
className: "min-w-0 truncate type-secondary text-foreground-secondary",
|
|
183
177
|
title: typeof caption === "string" ? caption : void 0,
|
|
184
178
|
children: caption
|
|
185
179
|
}) : null]
|
|
186
180
|
}) : null,
|
|
187
181
|
showFooter ? /* @__PURE__ */ jsxs("div", {
|
|
188
|
-
className:
|
|
182
|
+
className: "flex items-center gap-3 type-secondary",
|
|
189
183
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
190
184
|
className: "flex min-w-0 flex-1 items-center gap-3",
|
|
191
185
|
children: [showTrend ? /* @__PURE__ */ jsxs(Badge, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { a as StatusBadgeProps } from '../../status-badge.props-
|
|
4
|
-
export { S as StatusBadgeIcon } from '../../status-badge.props-
|
|
3
|
+
import { a as StatusBadgeProps } from '../../status-badge.props-BVe8CmQZ.js';
|
|
4
|
+
export { S as StatusBadgeIcon } from '../../status-badge.props-BVe8CmQZ.js';
|
|
5
5
|
import 'lucide-react';
|
|
6
6
|
import '../../index-BQANnKs9.js';
|
|
7
|
-
import '../../variant-
|
|
7
|
+
import '../../variant-DjdaxfIA.js';
|
|
8
8
|
import '../../style-axes-DSQ2DGc5.js';
|
|
9
9
|
|
|
10
10
|
declare const statusBadgeSizeVariants: (props?: ({
|
|
@@ -22,12 +22,12 @@ var ICON_PX = {
|
|
|
22
22
|
default: 16,
|
|
23
23
|
lg: 18
|
|
24
24
|
};
|
|
25
|
-
var statusBadgeSizeVariants = cva("rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] font-normal [&_svg]:shrink-0", {
|
|
25
|
+
var statusBadgeSizeVariants = cva("rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] type-caption font-normal [&_svg]:shrink-0", {
|
|
26
26
|
variants: {
|
|
27
27
|
size: {
|
|
28
|
-
sm: "gap-1 py-0.5
|
|
29
|
-
default: "gap-1.5 py-0.5
|
|
30
|
-
lg: "gap-1.5 py-1
|
|
28
|
+
sm: "gap-1 py-0.5",
|
|
29
|
+
default: "gap-1.5 py-0.5",
|
|
30
|
+
lg: "gap-1.5 py-1"
|
|
31
31
|
},
|
|
32
32
|
hasIcon: {
|
|
33
33
|
true: "",
|
|
@@ -82,8 +82,8 @@ var sizeStyles = {
|
|
|
82
82
|
sm: {
|
|
83
83
|
rowPad: "p-3",
|
|
84
84
|
gap: "gap-2",
|
|
85
|
-
primary: "
|
|
86
|
-
secondary: "
|
|
85
|
+
primary: "type-heading",
|
|
86
|
+
secondary: "type-secondary",
|
|
87
87
|
icon: "h-[18px] w-[18px] shrink-0",
|
|
88
88
|
endIcon: "size-5 shrink-0",
|
|
89
89
|
avatar: 36,
|
|
@@ -92,8 +92,8 @@ var sizeStyles = {
|
|
|
92
92
|
default: {
|
|
93
93
|
rowPad: "p-4",
|
|
94
94
|
gap: "gap-3",
|
|
95
|
-
primary: "
|
|
96
|
-
secondary: "
|
|
95
|
+
primary: "type-heading",
|
|
96
|
+
secondary: "type-body",
|
|
97
97
|
icon: "h-6 w-6 shrink-0",
|
|
98
98
|
endIcon: "size-6 shrink-0",
|
|
99
99
|
avatar: 44,
|
|
@@ -102,8 +102,8 @@ var sizeStyles = {
|
|
|
102
102
|
lg: {
|
|
103
103
|
rowPad: "p-6",
|
|
104
104
|
gap: "gap-4",
|
|
105
|
-
primary: "
|
|
106
|
-
secondary: "
|
|
105
|
+
primary: "type-heading",
|
|
106
|
+
secondary: "type-body",
|
|
107
107
|
icon: "h-8 w-8 shrink-0",
|
|
108
108
|
endIcon: "size-7 shrink-0",
|
|
109
109
|
avatar: 52,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
import { S as Size, P as PresetColor } from '../../index-BQANnKs9.js';
|
|
4
|
-
import { f as Variant } from '../../variant-
|
|
4
|
+
import { f as Variant } from '../../variant-DjdaxfIA.js';
|
|
5
5
|
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
6
6
|
|
|
7
7
|
interface TagProps extends HTMLAttributes<HTMLDivElement>, Pick<StyleAxisProps, "radius"> {
|
|
@@ -84,11 +84,11 @@ function getNameChipTint(variant, color) {
|
|
|
84
84
|
if (color === "silver") return builtInRow(SILVER_NAME_CHIP_TINT, variant);
|
|
85
85
|
return builtInRow(NAME_CHIP_TINT, variant)[color];
|
|
86
86
|
}
|
|
87
|
-
var tagSizeVariants = cva("inline-flex min-w-0 max-w-full items-center shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
|
|
87
|
+
var tagSizeVariants = cva("inline-flex min-w-0 max-w-full items-center type-caption shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
|
|
88
88
|
variants: { size: {
|
|
89
|
-
sm: "gap-1 px-1.5 py-0.5
|
|
90
|
-
default: "gap-1.5 px-2 py-1
|
|
91
|
-
lg: "gap-2 px-2.5 py-1.5
|
|
89
|
+
sm: "gap-1 px-1.5 py-0.5 [&_svg]:size-3",
|
|
90
|
+
default: "gap-1.5 px-2 py-1 [&_svg]:size-3.5",
|
|
91
|
+
lg: "gap-2 px-2.5 py-1.5 [&_svg]:size-4"
|
|
92
92
|
} },
|
|
93
93
|
defaultVariants: { size: "default" }
|
|
94
94
|
});
|
|
@@ -4,16 +4,16 @@ import { Tag } from "../tag/tag.js";
|
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/tag-input/tag-input.tsx
|
|
7
|
-
var labelClasses = "flex items-center gap-2
|
|
7
|
+
var labelClasses = "flex items-center gap-2 type-label leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
|
|
8
8
|
var controlSizeClasses = {
|
|
9
|
-
sm: "min-h-8 gap-1 px-2 py-1
|
|
10
|
-
default: "min-h-10 gap-1.5 px-3 py-2
|
|
11
|
-
lg: "min-h-12 gap-2 px-4 py-2
|
|
9
|
+
sm: "min-h-8 gap-1 px-2 py-1 type-input",
|
|
10
|
+
default: "min-h-10 gap-1.5 px-3 py-2 type-input",
|
|
11
|
+
lg: "min-h-12 gap-2 px-4 py-2 type-input"
|
|
12
12
|
};
|
|
13
13
|
var inputTextSizeClasses = {
|
|
14
|
-
sm: "
|
|
15
|
-
default: "
|
|
16
|
-
lg: "
|
|
14
|
+
sm: "type-input",
|
|
15
|
+
default: "type-input",
|
|
16
|
+
lg: "type-input"
|
|
17
17
|
};
|
|
18
18
|
function truncateDisplay(text, maxLen) {
|
|
19
19
|
if (text.length <= maxLen) return text;
|
|
@@ -100,12 +100,12 @@ var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size,
|
|
|
100
100
|
children: "*"
|
|
101
101
|
}) : null]
|
|
102
102
|
}), hintContent ? /* @__PURE__ */ jsx("span", {
|
|
103
|
-
className: "
|
|
103
|
+
className: "type-caption text-muted-foreground",
|
|
104
104
|
children: hintContent
|
|
105
105
|
}) : null]
|
|
106
106
|
}) : null,
|
|
107
107
|
!label && hintContent ? /* @__PURE__ */ jsx("span", {
|
|
108
|
-
className: "
|
|
108
|
+
className: "type-caption text-muted-foreground",
|
|
109
109
|
children: hintContent
|
|
110
110
|
}) : null,
|
|
111
111
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -146,17 +146,17 @@ var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size,
|
|
|
146
146
|
}),
|
|
147
147
|
errorContent ? /* @__PURE__ */ jsx("div", {
|
|
148
148
|
id: `${inputId}-error`,
|
|
149
|
-
className: "
|
|
149
|
+
className: "type-caption text-destructive",
|
|
150
150
|
children: errorContent
|
|
151
151
|
}) : null,
|
|
152
152
|
startHelperContent && !errorContent ? /* @__PURE__ */ jsx("div", {
|
|
153
153
|
id: `${inputId}-helper`,
|
|
154
|
-
className: "
|
|
154
|
+
className: "type-caption text-muted-foreground",
|
|
155
155
|
children: startHelperContent
|
|
156
156
|
}) : null,
|
|
157
157
|
endHelperContent && !errorContent ? /* @__PURE__ */ jsx("div", {
|
|
158
158
|
id: `${inputId}-helper`,
|
|
159
|
-
className: "text-end
|
|
159
|
+
className: "text-end type-caption text-muted-foreground",
|
|
160
160
|
children: endHelperContent
|
|
161
161
|
}) : null
|
|
162
162
|
]
|
|
@@ -62,10 +62,10 @@ var Timeline = React$1.forwardRef(function Timeline({ items, pageSize = DEFAULT_
|
|
|
62
62
|
/* @__PURE__ */ jsxs("div", {
|
|
63
63
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
64
64
|
children: [/* @__PURE__ */ jsx("div", {
|
|
65
|
-
className: "min-w-0
|
|
65
|
+
className: "min-w-0 type-body text-foreground [overflow-wrap:anywhere]",
|
|
66
66
|
children: item.title
|
|
67
67
|
}), item.time != null ? /* @__PURE__ */ jsx("div", {
|
|
68
|
-
className: "font-mono text-
|
|
68
|
+
className: "type-caption font-mono text-foreground-secondary",
|
|
69
69
|
children: item.time
|
|
70
70
|
}) : null]
|
|
71
71
|
})
|
|
@@ -3,7 +3,7 @@ import { ToasterProps } from 'sonner';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { C as Color } from '../../index-BQANnKs9.js';
|
|
5
5
|
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
6
|
-
import { f as Variant } from '../../variant-
|
|
6
|
+
import { f as Variant } from '../../variant-DjdaxfIA.js';
|
|
7
7
|
|
|
8
8
|
type ToastColor = Color;
|
|
9
9
|
type ToastVariant = Variant;
|
|
@@ -83,10 +83,10 @@ var Toast = React$1.forwardRef(({ icon, title, children, type, color, variant, h
|
|
|
83
83
|
/* @__PURE__ */ jsxs("div", {
|
|
84
84
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
85
85
|
children: [title && /* @__PURE__ */ jsx("div", {
|
|
86
|
-
className: "font-medium
|
|
86
|
+
className: "type-subheading font-medium",
|
|
87
87
|
children: title
|
|
88
88
|
}), children && /* @__PURE__ */ jsx("div", {
|
|
89
|
-
className: cn("
|
|
89
|
+
className: cn("type-body", styles.description),
|
|
90
90
|
style: styles.descriptionStyle,
|
|
91
91
|
children
|
|
92
92
|
})]
|
|
@@ -22,8 +22,11 @@ interface ToolbarProps {
|
|
|
22
22
|
/**
|
|
23
23
|
* A thin bar of small controls across the top of a work area — 44px, so
|
|
24
24
|
* 28px controls (`ToolbarButton`) sit in it with air on both sides. Three
|
|
25
|
-
* slots: the start and end share the width, so the centre is
|
|
26
|
-
* bar, not between whatever the sides happen to hold.
|
|
25
|
+
* slots: with a centre, the start and end share the width, so the centre is
|
|
26
|
+
* centred on the bar, not between whatever the sides happen to hold. With no
|
|
27
|
+
* centre there is nothing to keep centred: the end takes only the width its
|
|
28
|
+
* controls need and the start the rest, so a title there truncates as late as
|
|
29
|
+
* possible (a narrow phone). A bottom rule in the
|
|
27
30
|
* border colour every panel edge uses, so the bar and the columns under it
|
|
28
31
|
* read as one grid. Left/Right arrows move between its controls.
|
|
29
32
|
*/
|
|
@@ -30,7 +30,7 @@ function ToolbarButton({ label, icon, onClick, pressed, tooltip, count = 0, atte
|
|
|
30
30
|
}),
|
|
31
31
|
count > 0 && /* @__PURE__ */ jsx("span", {
|
|
32
32
|
"aria-hidden": true,
|
|
33
|
-
className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1
|
|
33
|
+
className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 type-caption leading-none font-semibold text-primary-foreground",
|
|
34
34
|
children: count
|
|
35
35
|
})
|
|
36
36
|
]
|
|
@@ -24,8 +24,11 @@ function moveFocus(event) {
|
|
|
24
24
|
/**
|
|
25
25
|
* A thin bar of small controls across the top of a work area — 44px, so
|
|
26
26
|
* 28px controls (`ToolbarButton`) sit in it with air on both sides. Three
|
|
27
|
-
* slots: the start and end share the width, so the centre is
|
|
28
|
-
* bar, not between whatever the sides happen to hold.
|
|
27
|
+
* slots: with a centre, the start and end share the width, so the centre is
|
|
28
|
+
* centred on the bar, not between whatever the sides happen to hold. With no
|
|
29
|
+
* centre there is nothing to keep centred: the end takes only the width its
|
|
30
|
+
* controls need and the start the rest, so a title there truncates as late as
|
|
31
|
+
* possible (a narrow phone). A bottom rule in the
|
|
29
32
|
* border colour every panel edge uses, so the bar and the columns under it
|
|
30
33
|
* read as one grid. Left/Right arrows move between its controls.
|
|
31
34
|
*/
|
|
@@ -38,15 +41,18 @@ function Toolbar({ label, start, center, end, tone = "page", className }) {
|
|
|
38
41
|
className: cn("flex h-11 shrink-0 items-center gap-2 border-b border-border px-2", tone === "dark" ? "dark bg-sidebar text-foreground" : "bg-background", className),
|
|
39
42
|
children: [
|
|
40
43
|
/* @__PURE__ */ jsx("div", {
|
|
44
|
+
"data-slot": "toolbar-start",
|
|
41
45
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
42
46
|
children: start
|
|
43
47
|
}),
|
|
44
48
|
center && /* @__PURE__ */ jsx("div", {
|
|
49
|
+
"data-slot": "toolbar-center",
|
|
45
50
|
className: "flex min-w-0 shrink-0 items-center justify-center",
|
|
46
51
|
children: center
|
|
47
52
|
}),
|
|
48
53
|
/* @__PURE__ */ jsx("div", {
|
|
49
|
-
|
|
54
|
+
"data-slot": "toolbar-end",
|
|
55
|
+
className: cn("flex min-w-0 items-center justify-end gap-2", center ? "flex-1" : "flex-none"),
|
|
50
56
|
children: end
|
|
51
57
|
})
|
|
52
58
|
]
|
|
@@ -23,7 +23,7 @@ function Trace({ size = "md", className, ...props }) {
|
|
|
23
23
|
value: size,
|
|
24
24
|
children: /* @__PURE__ */ jsx("div", {
|
|
25
25
|
"data-slot": "trace",
|
|
26
|
-
className: cn("flex min-w-0 flex-col gap-0.5", size === "sm" ? "
|
|
26
|
+
className: cn("flex min-w-0 flex-col gap-0.5 type-body", size === "sm" ? "leading-5" : "leading-6", className),
|
|
27
27
|
...props
|
|
28
28
|
})
|
|
29
29
|
});
|
|
@@ -89,7 +89,7 @@ function filterItemsByQuery(items, query, getLabel) {
|
|
|
89
89
|
}
|
|
90
90
|
function TransferListItems({ filteredItems, items, selectedIds, getItemId, getItemLabel, isItemDisabled, renderItem, disabled, rowVariants, onChecked }) {
|
|
91
91
|
if (filteredItems.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
92
|
-
className: "px-1 py-2
|
|
92
|
+
className: "px-1 py-2 type-body text-muted-foreground",
|
|
93
93
|
children: items.length === 0 ? "No items" : "No matching items"
|
|
94
94
|
});
|
|
95
95
|
return /* @__PURE__ */ jsx(AnimatePresence, {
|
|
@@ -113,7 +113,7 @@ function TransferListItems({ filteredItems, items, selectedIds, getItemId, getIt
|
|
|
113
113
|
onCheckedChange: (state) => onChecked(id, state),
|
|
114
114
|
"aria-label": label
|
|
115
115
|
}), /* @__PURE__ */ jsx("span", {
|
|
116
|
-
className: "min-w-0 flex-1
|
|
116
|
+
className: "min-w-0 flex-1 type-body text-foreground",
|
|
117
117
|
children: renderItem?.(item) ?? label
|
|
118
118
|
})]
|
|
119
119
|
}, id);
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { JSX, HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
|
-
declare const TYPOGRAPHY_VARIANTS: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "body1", "body2", "subtitle1", "subtitle2"];
|
|
4
|
+
declare const TYPOGRAPHY_VARIANTS: readonly ["display", "lead", "title", "headline", "heading", "subheading", "prose", "body", "secondary", "caption", "label", "code", "h1", "h2", "h3", "h4", "h5", "h6", "body1", "body2", "subtitle1", "subtitle2"];
|
|
5
5
|
type TypographyVariant = (typeof TYPOGRAPHY_VARIANTS)[number];
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Classes per variant. Size, line height and weight come from the role's
|
|
8
|
+
* `type-*` utility only (the tokens in `type-scale.css`), so a theme that
|
|
9
|
+
* changes a role changes every variant on it. Tune the scale there, not here.
|
|
10
|
+
*/
|
|
7
11
|
declare const typographyVariantClasses: Record<TypographyVariant, string>;
|
|
8
|
-
/** Default semantic tag per variant
|
|
12
|
+
/** Default semantic tag per variant. */
|
|
9
13
|
declare const typographyDefaultElement: Record<TypographyVariant, keyof JSX.IntrinsicElements>;
|
|
10
14
|
|
|
11
15
|
interface TypographyProps extends HTMLAttributes<HTMLElement> {
|
|
16
|
+
/**
|
|
17
|
+
* A role of the type scale (`title`, `heading`, `body`, `caption`, …), or one
|
|
18
|
+
* of the variants before 1.14 (`h1`…`h6`, `body1`, `body2`, `subtitle1`,
|
|
19
|
+
* `subtitle2`), each an alias of a role. Default `body1` (the `prose` role).
|
|
20
|
+
*/
|
|
12
21
|
variant?: TypographyVariant;
|
|
13
22
|
/** Override the rendered element while keeping variant styles (e.g. `as="span"` with `variant="h1"`). */
|
|
14
23
|
as?: keyof JSX.IntrinsicElements;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
//#region src/components/typography/typography-variants.ts
|
|
2
2
|
var TYPOGRAPHY_VARIANTS = [
|
|
3
|
+
"display",
|
|
4
|
+
"lead",
|
|
5
|
+
"title",
|
|
6
|
+
"headline",
|
|
7
|
+
"heading",
|
|
8
|
+
"subheading",
|
|
9
|
+
"prose",
|
|
10
|
+
"body",
|
|
11
|
+
"secondary",
|
|
12
|
+
"caption",
|
|
13
|
+
"label",
|
|
14
|
+
"code",
|
|
3
15
|
"h1",
|
|
4
16
|
"h2",
|
|
5
17
|
"h3",
|
|
@@ -11,21 +23,94 @@ var TYPOGRAPHY_VARIANTS = [
|
|
|
11
23
|
"subtitle1",
|
|
12
24
|
"subtitle2"
|
|
13
25
|
];
|
|
14
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Classes per variant. Size, line height and weight come from the role's
|
|
28
|
+
* `type-*` utility only (the tokens in `type-scale.css`), so a theme that
|
|
29
|
+
* changes a role changes every variant on it. Tune the scale there, not here.
|
|
30
|
+
*/
|
|
15
31
|
var typographyVariantClasses = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
display: "type-display tracking-tight",
|
|
33
|
+
lead: "type-lead",
|
|
34
|
+
title: "type-title tracking-tight",
|
|
35
|
+
headline: "type-headline tracking-tight",
|
|
36
|
+
heading: "type-heading",
|
|
37
|
+
subheading: "type-subheading",
|
|
38
|
+
prose: "type-prose",
|
|
39
|
+
body: "type-body",
|
|
40
|
+
secondary: "type-secondary",
|
|
41
|
+
caption: "type-caption",
|
|
42
|
+
label: "type-label",
|
|
43
|
+
code: "type-code font-mono",
|
|
44
|
+
h1: "type-title tracking-tight",
|
|
45
|
+
h2: "type-title tracking-tight",
|
|
46
|
+
h3: "type-headline tracking-tight",
|
|
47
|
+
h4: "type-heading",
|
|
48
|
+
h5: "type-heading",
|
|
49
|
+
h6: "type-subheading",
|
|
50
|
+
subtitle1: "type-label text-muted-foreground",
|
|
51
|
+
subtitle2: "type-caption font-medium text-muted-foreground",
|
|
52
|
+
body1: "type-prose",
|
|
53
|
+
body2: "type-body"
|
|
26
54
|
};
|
|
27
|
-
/**
|
|
55
|
+
/** The role each variant is, or aliases. */
|
|
56
|
+
var typographyVariantRole = {
|
|
57
|
+
display: "display",
|
|
58
|
+
lead: "lead",
|
|
59
|
+
title: "title",
|
|
60
|
+
headline: "headline",
|
|
61
|
+
heading: "heading",
|
|
62
|
+
subheading: "subheading",
|
|
63
|
+
prose: "prose",
|
|
64
|
+
body: "body",
|
|
65
|
+
secondary: "secondary",
|
|
66
|
+
caption: "caption",
|
|
67
|
+
label: "label",
|
|
68
|
+
code: "code",
|
|
69
|
+
h1: "title",
|
|
70
|
+
h2: "title",
|
|
71
|
+
h3: "headline",
|
|
72
|
+
h4: "heading",
|
|
73
|
+
h5: "heading",
|
|
74
|
+
h6: "subheading",
|
|
75
|
+
subtitle1: "label",
|
|
76
|
+
subtitle2: "caption",
|
|
77
|
+
body1: "prose",
|
|
78
|
+
body2: "body"
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* The role's weight on its own, for when a caller's raw text size
|
|
82
|
+
* (`className="text-xs"`) replaces the role: before 1.14 such an override
|
|
83
|
+
* replaced only the variant's size, so the variant's weight is kept. Written
|
|
84
|
+
* out in full so Tailwind finds every class in the built files.
|
|
85
|
+
*/
|
|
86
|
+
var typographyRoleWeightClasses = {
|
|
87
|
+
display: "font-[weight:var(--espd-type-display-weight,800)]",
|
|
88
|
+
lead: "font-[weight:var(--espd-type-lead-weight,400)]",
|
|
89
|
+
title: "font-[weight:var(--espd-type-title-weight,700)]",
|
|
90
|
+
headline: "font-[weight:var(--espd-type-headline-weight,600)]",
|
|
91
|
+
heading: "font-[weight:var(--espd-type-heading-weight,600)]",
|
|
92
|
+
subheading: "font-[weight:var(--espd-type-subheading-weight,600)]",
|
|
93
|
+
prose: "font-[weight:var(--espd-type-prose-weight,400)]",
|
|
94
|
+
body: "font-[weight:var(--espd-type-body-weight,400)]",
|
|
95
|
+
secondary: "font-[weight:var(--espd-type-secondary-weight,400)]",
|
|
96
|
+
caption: "font-[weight:var(--espd-type-caption-weight,400)]",
|
|
97
|
+
label: "font-[weight:var(--espd-type-label-weight,500)]",
|
|
98
|
+
code: "font-[weight:var(--espd-type-code-weight,400)]"
|
|
99
|
+
};
|
|
100
|
+
/** Default semantic tag per variant. */
|
|
28
101
|
var typographyDefaultElement = {
|
|
102
|
+
display: "h1",
|
|
103
|
+
lead: "p",
|
|
104
|
+
title: "h1",
|
|
105
|
+
headline: "h2",
|
|
106
|
+
heading: "h3",
|
|
107
|
+
subheading: "h4",
|
|
108
|
+
prose: "p",
|
|
109
|
+
body: "p",
|
|
110
|
+
secondary: "p",
|
|
111
|
+
caption: "span",
|
|
112
|
+
label: "span",
|
|
113
|
+
code: "code",
|
|
29
114
|
h1: "h1",
|
|
30
115
|
h2: "h2",
|
|
31
116
|
h3: "h3",
|
|
@@ -38,4 +123,4 @@ var typographyDefaultElement = {
|
|
|
38
123
|
body2: "p"
|
|
39
124
|
};
|
|
40
125
|
//#endregion
|
|
41
|
-
export { TYPOGRAPHY_VARIANTS, typographyDefaultElement, typographyVariantClasses };
|
|
126
|
+
export { TYPOGRAPHY_VARIANTS, typographyDefaultElement, typographyRoleWeightClasses, typographyVariantClasses, typographyVariantRole };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
-
import { typographyDefaultElement, typographyVariantClasses } from "./typography-variants.js";
|
|
2
|
+
import { typographyDefaultElement, typographyRoleWeightClasses, typographyVariantClasses, typographyVariantRole } from "./typography-variants.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
//#region src/components/typography/typography.tsx
|
|
5
5
|
var Typography = React$1.forwardRef(function Typography({ variant = "body1", as, className, children, ...rest }, ref) {
|
|
6
6
|
const Component = as ?? typographyDefaultElement[variant];
|
|
7
|
+
const role = typographyVariantRole[variant];
|
|
8
|
+
const sizeOverridden = !!className && !cn(`type-${role}`, className).split(" ").includes(`type-${role}`);
|
|
7
9
|
return React$1.createElement(Component, {
|
|
8
10
|
ref,
|
|
9
|
-
className: cn("text-foreground", typographyVariantClasses[variant], className),
|
|
11
|
+
className: cn("text-foreground", sizeOverridden && typographyRoleWeightClasses[role], typographyVariantClasses[variant], className),
|
|
10
12
|
...rest
|
|
11
13
|
}, children);
|
|
12
14
|
});
|
|
@@ -5,11 +5,11 @@ import * as React$1 from "react";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
//#region src/components/user-type-badge/user-type-badge.tsx
|
|
8
|
-
var userTypeBadgeSizeVariants = cva("inline-flex font-medium tracking-tight shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
|
|
8
|
+
var userTypeBadgeSizeVariants = cva("inline-flex type-caption font-medium tracking-tight shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
|
|
9
9
|
variants: { size: {
|
|
10
|
-
sm: "gap-1 px-1.5 py-0.5
|
|
11
|
-
default: "gap-1.5 px-2 py-1
|
|
12
|
-
lg: "gap-2 px-2.5 py-1.5
|
|
10
|
+
sm: "gap-1 px-1.5 py-0.5 [&_svg]:size-3",
|
|
11
|
+
default: "gap-1.5 px-2 py-1 [&_svg]:size-3.5",
|
|
12
|
+
lg: "gap-2 px-2.5 py-1.5 [&_svg]:size-4"
|
|
13
13
|
} },
|
|
14
14
|
defaultVariants: { size: "default" }
|
|
15
15
|
});
|