@espressif/dashboard-ui-components 1.12.0 → 1.14.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/.claude/rules/dashboard-ui-consumption.md +63 -2
- package/.cursor/rules/dashboard-ui-consumption.mdc +61 -3
- package/CHANGELOG.md +265 -0
- package/README.md +59 -8
- 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/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/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 +49 -41
- 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/floating-window/_hooks/use-drag-move.js +1 -0
- package/dist/components/floating-window/_hooks/use-resize.js +133 -0
- package/dist/components/floating-window/floating-window.js +67 -40
- package/dist/components/floating-window/index.d.ts +21 -2
- 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 +2 -6
- package/dist/components/horizontal-stepper/index.d.ts +2 -2
- 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 +14 -8
- package/dist/components/index.js +15 -6
- 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/keyframes/index.d.ts +53 -0
- package/dist/components/keyframes/index.js +3 -0
- package/dist/components/keyframes/keyframes-motion.js +23 -0
- package/dist/components/keyframes/keyframes.js +37 -0
- 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/index.d.ts +26 -0
- package/dist/components/qr-code/index.js +2 -0
- package/dist/components/qr-code/qr-code.js +69 -0
- package/dist/components/radio-group/radio-group.js +3 -3
- package/dist/components/range-field/index.d.ts +45 -0
- package/dist/components/range-field/index.js +2 -0
- package/dist/components/range-field/range-field.js +161 -0
- package/dist/components/readout/readout.js +1 -1
- package/dist/components/requirement-list/requirement-list.js +5 -10
- package/dist/components/reveal/index.d.ts +6 -3
- package/dist/components/reveal/reveal.js +7 -4
- package/dist/components/scrollable-sections/scrollable-sections.js +1 -1
- package/dist/components/search-box/index.d.ts +3 -1
- package/dist/components/search-box/search-box.js +7 -12
- 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/index.d.ts +14 -3
- package/dist/components/showcase-card/showcase-card.js +43 -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 +19 -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/step-tabs/index.d.ts +1 -1
- 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/index.d.ts +49 -0
- package/dist/components/trace/index.js +2 -0
- package/dist/components/trace/trace.js +109 -0
- 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/index.d.ts +2 -2
- package/dist/components/vertical-stepper/vertical-stepper.js +18 -11
- 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.js +1 -1
- 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-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 +14 -8
- package/dist/index.js +16 -7
- 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/index.d.ts +31 -2
- package/dist/utils/index.js +2 -1
- package/dist/utils/variant.js +47 -47
- package/dist/{variant-D81RhpbR.d.ts → variant-DjdaxfIA.d.ts} +6 -1
- package/dist/{vertical-stepper.props-BXYcbW70.d.ts → vertical-stepper.props-DONJJXIy.d.ts} +1 -0
- package/package.json +9 -1
- package/src/styles/theme.css +23 -3
- package/src/styles/type-scale.css +152 -0
- package/tailwind.preset.ts +23 -0
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
//#region src/common/footer-card/footer-card.tsx
|
|
4
4
|
function FooterCard() {
|
|
5
5
|
return /* @__PURE__ */ jsxs("div", {
|
|
6
|
-
className: "
|
|
6
|
+
className: "type-caption",
|
|
7
7
|
children: [
|
|
8
8
|
"© ",
|
|
9
9
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
@@ -11,7 +11,7 @@ function FooterCard() {
|
|
|
11
11
|
/* @__PURE__ */ jsx(Link, {
|
|
12
12
|
to: "https://www.espressif.com/",
|
|
13
13
|
underline: true,
|
|
14
|
-
className: "h-auto hover:bg-transparent p-0
|
|
14
|
+
className: "h-auto hover:bg-transparent p-0 type-caption",
|
|
15
15
|
children: "Espressif Systems"
|
|
16
16
|
}),
|
|
17
17
|
". All rights reserved."
|
package/dist/common/index.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ declare function CopyrightCard({ text, logoSrc, logoAlt, href, logoOnly, }: Copy
|
|
|
30
30
|
/**
|
|
31
31
|
* Full-screen loading indicator
|
|
32
32
|
* Used as defaultPendingComponent for route transitions
|
|
33
|
+
*
|
|
34
|
+
* The bar is at most 24rem wide and keeps 1.5rem off each edge of a narrower
|
|
35
|
+
* screen (the padding is outside the column, so a wide screen is unaffected).
|
|
33
36
|
*/
|
|
34
37
|
declare function PageLoader(): React$1.JSX.Element;
|
|
35
38
|
|
|
@@ -26,10 +26,10 @@ function MyAccountMenu({ name, email, imageUrl, minWidth = "200px", menuItems, a
|
|
|
26
26
|
/* @__PURE__ */ jsxs("span", {
|
|
27
27
|
className: "grid min-w-0 flex-1 leading-tight",
|
|
28
28
|
children: [name && /* @__PURE__ */ jsx("span", {
|
|
29
|
-
className: "truncate
|
|
29
|
+
className: "truncate type-label leading-tight",
|
|
30
30
|
children: name
|
|
31
31
|
}), email && /* @__PURE__ */ jsx("span", {
|
|
32
|
-
className: "truncate
|
|
32
|
+
className: "truncate type-secondary leading-tight text-muted-foreground",
|
|
33
33
|
children: email
|
|
34
34
|
})]
|
|
35
35
|
}),
|
|
@@ -4,10 +4,13 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
/**
|
|
5
5
|
* Full-screen loading indicator
|
|
6
6
|
* Used as defaultPendingComponent for route transitions
|
|
7
|
+
*
|
|
8
|
+
* The bar is at most 24rem wide and keeps 1.5rem off each edge of a narrower
|
|
9
|
+
* screen (the padding is outside the column, so a wide screen is unaffected).
|
|
7
10
|
*/
|
|
8
11
|
function PageLoader() {
|
|
9
12
|
return /* @__PURE__ */ jsx("div", {
|
|
10
|
-
className: "flex min-h-screen items-center justify-center bg-background",
|
|
13
|
+
className: "flex min-h-screen items-center justify-center bg-background px-6",
|
|
11
14
|
children: /* @__PURE__ */ jsx("div", {
|
|
12
15
|
className: "flex flex-col items-center gap-4 w-full max-w-sm",
|
|
13
16
|
children: /* @__PURE__ */ jsx(ProgressBar, {
|
|
@@ -14,10 +14,10 @@ function ProfileCard({ name, email, imageUrl, avatarColor }) {
|
|
|
14
14
|
}), /* @__PURE__ */ jsxs("div", {
|
|
15
15
|
className: "flex-1 min-w-0 flex flex-col gap-1",
|
|
16
16
|
children: [name && /* @__PURE__ */ jsx("div", {
|
|
17
|
-
className: "
|
|
17
|
+
className: "type-label text-foreground truncate",
|
|
18
18
|
children: name
|
|
19
19
|
}), email && /* @__PURE__ */ jsx("div", {
|
|
20
|
-
className: "
|
|
20
|
+
className: "type-secondary text-muted-foreground truncate",
|
|
21
21
|
children: email
|
|
22
22
|
})]
|
|
23
23
|
})]
|
|
@@ -2,21 +2,19 @@ import { cn } from "../../utils/cn.js";
|
|
|
2
2
|
import { Accordion as Accordion$1, AccordionContent, AccordionItem, AccordionTrigger } from "../../core/animate-ui/components/radix/accordion.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/accordion/accordion.tsx
|
|
5
|
+
var TITLE_TEXT = "type-heading font-medium tracking-tight";
|
|
5
6
|
var sizeStyles = {
|
|
6
7
|
sm: {
|
|
7
8
|
trigger: "py-2 px-3",
|
|
8
|
-
content: "px-3 pb-2"
|
|
9
|
-
text: "text-sm font-medium tracking-tight"
|
|
9
|
+
content: "px-3 pb-2 type-secondary"
|
|
10
10
|
},
|
|
11
11
|
default: {
|
|
12
12
|
trigger: "py-3 px-4",
|
|
13
|
-
content: "px-4 pb-3"
|
|
14
|
-
text: "text-base font-medium tracking-tight"
|
|
13
|
+
content: "px-4 pb-3 type-body"
|
|
15
14
|
},
|
|
16
15
|
lg: {
|
|
17
16
|
trigger: "py-4 px-5",
|
|
18
|
-
content: "px-5 pb-4"
|
|
19
|
-
text: "text-lg font-medium tracking-tight"
|
|
17
|
+
content: "px-5 pb-4 type-body"
|
|
20
18
|
}
|
|
21
19
|
};
|
|
22
20
|
/** The open ids in the shape the primitive wants for the mode: one string (single), or a list (multiple). */
|
|
@@ -43,16 +41,13 @@ function Accordion({ items, size = "default", allowMultiple = false, defaultValu
|
|
|
43
41
|
children: /* @__PURE__ */ jsxs("span", {
|
|
44
42
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
45
43
|
children: [item.icon, typeof item.title === "string" ? /* @__PURE__ */ jsx("span", {
|
|
46
|
-
className:
|
|
44
|
+
className: TITLE_TEXT,
|
|
47
45
|
children: item.title
|
|
48
46
|
}) : item.title]
|
|
49
47
|
})
|
|
50
48
|
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
51
49
|
className: cn(styles.content, contentClassName),
|
|
52
|
-
children:
|
|
53
|
-
className: styles.text,
|
|
54
|
-
children: item.content
|
|
55
|
-
}) : item.content
|
|
50
|
+
children: item.content
|
|
56
51
|
})]
|
|
57
52
|
}, item.id))
|
|
58
53
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { b as AlertProps } from '../../alert.props-
|
|
3
|
-
export { A as AlertColor, a as AlertIconAvatarVariant, c as AlertSize, d as AlertType, e as AlertVariant } from '../../alert.props-
|
|
2
|
+
import { b as AlertProps } from '../../alert.props-BuLuWmXA.js';
|
|
3
|
+
export { A as AlertColor, a as AlertIconAvatarVariant, c as AlertSize, d as AlertType, e as AlertVariant } from '../../alert.props-BuLuWmXA.js';
|
|
4
4
|
import '../../index-BQANnKs9.js';
|
|
5
|
-
import '../../variant-
|
|
5
|
+
import '../../variant-DjdaxfIA.js';
|
|
6
6
|
import '../../style-axes-DSQ2DGc5.js';
|
|
7
|
-
import '../../icon-avatar.props-
|
|
8
|
-
import '../../icon-text-action-card.props-
|
|
7
|
+
import '../../icon-avatar.props-BJe0-vva.js';
|
|
8
|
+
import '../../icon-text-action-card.props-BU7yFi2Q.js';
|
|
9
9
|
|
|
10
10
|
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
|
|
@@ -49,19 +49,19 @@ function AnchoredPanel({ open, anchorRef, side, title, subtitle, badge, closeLab
|
|
|
49
49
|
children: [
|
|
50
50
|
/* @__PURE__ */ jsx(Typography, {
|
|
51
51
|
id: titleId,
|
|
52
|
-
variant: "
|
|
52
|
+
variant: "heading",
|
|
53
53
|
as: "h2",
|
|
54
|
-
className: "m-0 min-w-0 truncate text-
|
|
54
|
+
className: "m-0 min-w-0 truncate text-foreground",
|
|
55
55
|
children: title
|
|
56
56
|
}),
|
|
57
57
|
subtitle && /* @__PURE__ */ jsx("span", {
|
|
58
|
-
className: "min-w-0 flex-1 truncate font-mono
|
|
58
|
+
className: "min-w-0 flex-1 truncate font-mono type-code text-foreground-secondary",
|
|
59
59
|
children: subtitle
|
|
60
60
|
}),
|
|
61
61
|
!subtitle && /* @__PURE__ */ jsx("span", { className: "flex-1" }),
|
|
62
62
|
badge && /* @__PURE__ */ jsx(Badge, {
|
|
63
63
|
variant: "outline",
|
|
64
|
-
className: "shrink-0 rounded-xs font-mono
|
|
64
|
+
className: "shrink-0 rounded-xs font-mono type-caption",
|
|
65
65
|
children: badge
|
|
66
66
|
}),
|
|
67
67
|
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
@@ -9,9 +9,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { Check, ChevronDown, X } from "lucide-react";
|
|
10
10
|
//#region src/components/async-multi-select/async-multi-select.tsx
|
|
11
11
|
var triggerSizeClasses = {
|
|
12
|
-
sm: "min-h-8 px-3
|
|
13
|
-
default: "min-h-10 px-3.5 py-2
|
|
14
|
-
lg: "min-h-12 px-5
|
|
12
|
+
sm: "min-h-8 px-3 type-input",
|
|
13
|
+
default: "min-h-10 px-3.5 py-2 type-input",
|
|
14
|
+
lg: "min-h-12 px-5 type-input"
|
|
15
15
|
};
|
|
16
16
|
var chevronSizeClasses = {
|
|
17
17
|
sm: "size-3.5",
|
|
@@ -108,7 +108,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
|
|
|
108
108
|
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
109
109
|
})]
|
|
110
110
|
}, opt.value)), remaining > 0 && /* @__PURE__ */ jsxs("span", {
|
|
111
|
-
className: "
|
|
111
|
+
className: "type-caption text-muted-foreground",
|
|
112
112
|
children: [
|
|
113
113
|
"+",
|
|
114
114
|
remaining,
|
|
@@ -133,7 +133,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
|
|
|
133
133
|
className: "flex items-center justify-between",
|
|
134
134
|
children: /* @__PURE__ */ jsxs("label", {
|
|
135
135
|
htmlFor: triggerId,
|
|
136
|
-
className: "flex items-center gap-2
|
|
136
|
+
className: "flex items-center gap-2 type-label leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",
|
|
137
137
|
children: [label, required && /* @__PURE__ */ jsx("span", {
|
|
138
138
|
className: "text-destructive",
|
|
139
139
|
children: "*"
|
|
@@ -169,7 +169,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
|
|
|
169
169
|
className: "overscroll-contain",
|
|
170
170
|
children: [
|
|
171
171
|
action ? options.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
172
|
-
className: "py-6 text-center
|
|
172
|
+
className: "py-6 text-center type-body",
|
|
173
173
|
children: emptyContent
|
|
174
174
|
}) : /* @__PURE__ */ jsx(CommandEmpty, { children: emptyContent }),
|
|
175
175
|
/* @__PURE__ */ jsx(CommandGroup, {
|
|
@@ -190,7 +190,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
|
|
|
190
190
|
className: "font-medium leading-relaxed",
|
|
191
191
|
children: opt.label
|
|
192
192
|
}), /* @__PURE__ */ jsx("span", {
|
|
193
|
-
className: "truncate
|
|
193
|
+
className: "truncate type-secondary text-muted-foreground",
|
|
194
194
|
children: desc
|
|
195
195
|
})]
|
|
196
196
|
}) : opt.label]
|
|
@@ -223,7 +223,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
|
|
|
223
223
|
className: "font-medium leading-relaxed",
|
|
224
224
|
children: action.label
|
|
225
225
|
}), action.description && /* @__PURE__ */ jsx("span", {
|
|
226
|
-
className: "truncate
|
|
226
|
+
className: "truncate type-secondary text-muted-foreground",
|
|
227
227
|
children: action.description
|
|
228
228
|
})]
|
|
229
229
|
})]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
4
|
-
import { f as Variant } from '../../variant-
|
|
4
|
+
import { f as Variant } from '../../variant-DjdaxfIA.js';
|
|
5
5
|
import { C as Color } from '../../index-BQANnKs9.js';
|
|
6
6
|
|
|
7
7
|
declare const badgeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
//#region src/components/bottom-sheet/_hooks/use-sheet-drag.ts
|
|
3
|
+
/** The sheet's two open heights, as a share of the viewport: the `h-1/2` and `h-5/6` the sheet draws with. */
|
|
4
|
+
var SHEET_HEIGHTS = {
|
|
5
|
+
half: .5,
|
|
6
|
+
tall: 5 / 6
|
|
7
|
+
};
|
|
8
|
+
/** Below this share of the viewport a let-go sheet is put away rather than kept open. */
|
|
9
|
+
var CLOSE_BELOW = .3;
|
|
10
|
+
/** A drag no longer than this (px) is a tap: the handle's own click toggles the height. */
|
|
11
|
+
var TAP_SLOP = 6;
|
|
12
|
+
/** A flick: px per ms past which the direction decides, whatever the height. */
|
|
13
|
+
var FLICK = .6;
|
|
14
|
+
/** The drag never makes the sheet smaller or taller than this share of the viewport. */
|
|
15
|
+
var MIN_SHARE = .12;
|
|
16
|
+
var MAX_SHARE = .92;
|
|
17
|
+
/**
|
|
18
|
+
* Where a sheet let go of comes to rest: a quick flick goes the way it was
|
|
19
|
+
* flicked (down from half puts it away), otherwise the nearest open height,
|
|
20
|
+
* or away once dragged low enough. `share` is the sheet's height as a share
|
|
21
|
+
* of the viewport; `velocity` is px per ms, down positive.
|
|
22
|
+
*/
|
|
23
|
+
function settleSheet({ share, velocity, from }) {
|
|
24
|
+
if (velocity > FLICK) return from === "tall" && share > SHEET_HEIGHTS.half * .8 ? "half" : "closed";
|
|
25
|
+
if (velocity < -.6) return "tall";
|
|
26
|
+
if (share < CLOSE_BELOW) return "closed";
|
|
27
|
+
return Math.abs(share - SHEET_HEIGHTS.tall) < Math.abs(share - SHEET_HEIGHTS.half) ? "tall" : "half";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The height the sheet's `h-1/2` and `h-5/6` are shares of: the viewport for
|
|
31
|
+
* a `fixed` sheet, or the positioned box an `absolute` one sits in (a framed
|
|
32
|
+
* preview).
|
|
33
|
+
*/
|
|
34
|
+
function viewportHeight(element) {
|
|
35
|
+
const box = element.offsetParent;
|
|
36
|
+
return box instanceof HTMLElement && box.clientHeight > 0 ? box.clientHeight : window.innerHeight;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A bottom sheet that follows the finger: dragged by its grip (the handle and
|
|
40
|
+
* the title bar; the sheet's content keeps its own scrolling), it takes the
|
|
41
|
+
* height the finger gives it, and let go it comes to rest (`settleSheet`).
|
|
42
|
+
* The height changes with every frame, so it is written to the sheet from
|
|
43
|
+
* here and dropped again when the sheet rests, the class taking over (the
|
|
44
|
+
* transition carries it there). The grip claims the gesture (`touch-none`
|
|
45
|
+
* on it), so dragging down never reaches the browser's pull-to-refresh.
|
|
46
|
+
*/
|
|
47
|
+
function useSheetDrag(sheet, rest, onRest) {
|
|
48
|
+
const gesture = useRef(null);
|
|
49
|
+
const swallowClick = useRef(false);
|
|
50
|
+
function end(event, cancelled) {
|
|
51
|
+
const active = gesture.current;
|
|
52
|
+
if (!active || active.pointerId !== event.pointerId) return;
|
|
53
|
+
gesture.current = null;
|
|
54
|
+
event.currentTarget.releasePointerCapture?.(event.pointerId);
|
|
55
|
+
const element = sheet.current;
|
|
56
|
+
element?.removeAttribute("data-dragging");
|
|
57
|
+
if (!active.moved || !element) return;
|
|
58
|
+
swallowClick.current = true;
|
|
59
|
+
const share = element.getBoundingClientRect().height / viewportHeight(element);
|
|
60
|
+
onRest(cancelled ? rest : settleSheet({
|
|
61
|
+
share,
|
|
62
|
+
velocity: active.velocity,
|
|
63
|
+
from: rest
|
|
64
|
+
}));
|
|
65
|
+
requestAnimationFrame(() => element.style.removeProperty("height"));
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
onPointerDown(event) {
|
|
69
|
+
const control = event.target.closest("button, a, input");
|
|
70
|
+
if (event.button !== 0 || !sheet.current || control && !control.hasAttribute("data-sheet-grip")) return;
|
|
71
|
+
swallowClick.current = false;
|
|
72
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
73
|
+
const startHeight = sheet.current.getBoundingClientRect().height;
|
|
74
|
+
gesture.current = {
|
|
75
|
+
pointerId: event.pointerId,
|
|
76
|
+
startY: event.clientY,
|
|
77
|
+
startHeight,
|
|
78
|
+
lastY: event.clientY,
|
|
79
|
+
lastAt: event.timeStamp,
|
|
80
|
+
velocity: 0,
|
|
81
|
+
moved: false
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
onPointerMove(event) {
|
|
85
|
+
const active = gesture.current;
|
|
86
|
+
const element = sheet.current;
|
|
87
|
+
if (!active || active.pointerId !== event.pointerId || !element) return;
|
|
88
|
+
const dy = event.clientY - active.startY;
|
|
89
|
+
if (!active.moved && Math.abs(dy) < TAP_SLOP) return;
|
|
90
|
+
active.moved = true;
|
|
91
|
+
const dt = Math.max(1, event.timeStamp - active.lastAt);
|
|
92
|
+
active.velocity = (event.clientY - active.lastY) / dt;
|
|
93
|
+
active.lastY = event.clientY;
|
|
94
|
+
active.lastAt = event.timeStamp;
|
|
95
|
+
const viewport = viewportHeight(element);
|
|
96
|
+
const height = Math.min(MAX_SHARE * viewport, Math.max(MIN_SHARE * viewport, active.startHeight - dy));
|
|
97
|
+
element.setAttribute("data-dragging", "");
|
|
98
|
+
element.style.height = `${height}px`;
|
|
99
|
+
},
|
|
100
|
+
onPointerUp: (event) => end(event, false),
|
|
101
|
+
onPointerCancel: (event) => end(event, true),
|
|
102
|
+
onClickCapture(event) {
|
|
103
|
+
if (swallowClick.current) {
|
|
104
|
+
swallowClick.current = false;
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
event.stopPropagation();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
export { SHEET_HEIGHTS, settleSheet, useSheetDrag };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { Typography } from "../typography/typography.js";
|
|
3
|
+
import { ToolbarButton } from "../toolbar/toolbar-button.js";
|
|
4
|
+
import { useSheetDrag } from "./_hooks/use-sheet-drag.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { X } from "lucide-react";
|
|
8
|
+
//#region src/components/bottom-sheet/bottom-sheet.tsx
|
|
9
|
+
/**
|
|
10
|
+
* A phone's panel: a sheet up from the bottom edge, half the screen, so what
|
|
11
|
+
* it works on stays in view above it. Its grip (the handle and the title bar)
|
|
12
|
+
* drags it: up to nearly all of the screen, back to half, or down and away. A
|
|
13
|
+
* tap on the handle toggles the two heights. Not modal: the page above still
|
|
14
|
+
* answers a tap. Escape or ✕ closes it.
|
|
15
|
+
*/
|
|
16
|
+
var BottomSheet = React$1.forwardRef(({ title, icon, labels, onClose, children, className }, ref) => {
|
|
17
|
+
const titleId = React$1.useId();
|
|
18
|
+
const [tall, setTall] = React$1.useState(false);
|
|
19
|
+
const sheet = React$1.useRef(null);
|
|
20
|
+
const drag = useSheetDrag(sheet, tall ? "tall" : "half", (rest) => rest === "closed" ? onClose() : setTall(rest === "tall"));
|
|
21
|
+
const setRef = React$1.useCallback((node) => {
|
|
22
|
+
sheet.current = node;
|
|
23
|
+
if (typeof ref === "function") ref(node);
|
|
24
|
+
else if (ref) ref.current = node;
|
|
25
|
+
}, [ref]);
|
|
26
|
+
function onKeyDown(event) {
|
|
27
|
+
if (event.key === "Escape") {
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
onClose();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
33
|
+
ref: setRef,
|
|
34
|
+
role: "dialog",
|
|
35
|
+
"aria-modal": false,
|
|
36
|
+
"aria-labelledby": titleId,
|
|
37
|
+
onKeyDown,
|
|
38
|
+
"data-slot": "bottom-sheet",
|
|
39
|
+
className: cn("fixed inset-x-0 bottom-0 z-40 flex flex-col overflow-hidden rounded-t-[var(--espd-radius-surface,var(--radius-2xl))] border-t border-border bg-background shadow-float transition-all duration-200 starting:translate-y-full data-dragging:transition-none motion-reduce:transition-none", tall ? "h-5/6" : "h-1/2", className),
|
|
40
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "flex shrink-0 cursor-grab touch-none flex-col select-none active:cursor-grabbing",
|
|
42
|
+
...drag,
|
|
43
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
44
|
+
type: "button",
|
|
45
|
+
"data-sheet-grip": true,
|
|
46
|
+
"aria-label": tall ? labels.collapse : labels.expand,
|
|
47
|
+
"aria-expanded": tall,
|
|
48
|
+
onClick: () => setTall(!tall),
|
|
49
|
+
className: "flex h-5 shrink-0 cursor-pointer items-center justify-center outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
50
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
51
|
+
"aria-hidden": true,
|
|
52
|
+
className: "h-1 w-10 rounded-full bg-foreground-muted"
|
|
53
|
+
})
|
|
54
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: "flex shrink-0 items-center gap-2 border-b border-border px-4 pb-2",
|
|
56
|
+
children: [
|
|
57
|
+
icon && /* @__PURE__ */ jsx("span", {
|
|
58
|
+
"aria-hidden": true,
|
|
59
|
+
className: "flex shrink-0 text-foreground-secondary",
|
|
60
|
+
children: icon
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
63
|
+
id: titleId,
|
|
64
|
+
variant: "heading",
|
|
65
|
+
as: "h2",
|
|
66
|
+
className: "m-0 min-w-0 flex-1 truncate text-foreground",
|
|
67
|
+
children: title
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
70
|
+
label: labels.close,
|
|
71
|
+
icon: /* @__PURE__ */ jsx(X, {}),
|
|
72
|
+
onClick: onClose
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
})]
|
|
76
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
77
|
+
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain",
|
|
78
|
+
children
|
|
79
|
+
})]
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
BottomSheet.displayName = "BottomSheet";
|
|
83
|
+
//#endregion
|
|
84
|
+
export { BottomSheet };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/** The sheet's own controls, named in the page's language (no English defaults). */
|
|
5
|
+
interface BottomSheetLabels {
|
|
6
|
+
/** The handle's name while the sheet is at half height. */
|
|
7
|
+
expand: string;
|
|
8
|
+
/** The handle's name while the sheet is tall. */
|
|
9
|
+
collapse: string;
|
|
10
|
+
/** The ✕ button's name. */
|
|
11
|
+
close: string;
|
|
12
|
+
}
|
|
13
|
+
interface BottomSheetProps {
|
|
14
|
+
/** Names the sheet (its dialog role) and shows in its title bar. */
|
|
15
|
+
title: string;
|
|
16
|
+
/** Beside the title. */
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
labels: BottomSheetLabels;
|
|
19
|
+
/** Escape, ✕, or a drag or flick down. Open and closed is the parent's: it renders the sheet or doesn't. */
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
/** What the sheet holds; it scrolls on its own below the title bar. */
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
/** Merged onto the sheet's `<section>` (e.g. `absolute` instead of `fixed` inside a framed preview). */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A phone's panel: a sheet up from the bottom edge, half the screen, so what
|
|
29
|
+
* it works on stays in view above it. Its grip (the handle and the title bar)
|
|
30
|
+
* drags it: up to nearly all of the screen, back to half, or down and away. A
|
|
31
|
+
* tap on the handle toggles the two heights. Not modal: the page above still
|
|
32
|
+
* answers a tap. Escape or ✕ closes it.
|
|
33
|
+
*/
|
|
34
|
+
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLElement>>;
|
|
35
|
+
|
|
36
|
+
/** Where a bottom sheet rests: half the screen, nearly all of it, or put away. */
|
|
37
|
+
type SheetRest = "half" | "tall" | "closed";
|
|
38
|
+
/**
|
|
39
|
+
* Where a sheet let go of comes to rest: a quick flick goes the way it was
|
|
40
|
+
* flicked (down from half puts it away), otherwise the nearest open height,
|
|
41
|
+
* or away once dragged low enough. `share` is the sheet's height as a share
|
|
42
|
+
* of the viewport; `velocity` is px per ms, down positive.
|
|
43
|
+
*/
|
|
44
|
+
declare function settleSheet({ share, velocity, from }: {
|
|
45
|
+
share: number;
|
|
46
|
+
velocity: number;
|
|
47
|
+
from: Exclude<SheetRest, "closed">;
|
|
48
|
+
}): SheetRest;
|
|
49
|
+
|
|
50
|
+
export { BottomSheet, type BottomSheetLabels, type BottomSheetProps, type SheetRest, settleSheet };
|
|
@@ -10,7 +10,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
10
10
|
function Bubble({ variant = "plain", size = "base", className, ...props }) {
|
|
11
11
|
return /* @__PURE__ */ jsx("div", {
|
|
12
12
|
"data-slot": "bubble",
|
|
13
|
-
className: cn("min-w-0 wrap-break-word whitespace-pre-line text-foreground", size === "sm" ? "
|
|
13
|
+
className: cn("min-w-0 wrap-break-word whitespace-pre-line text-foreground", size === "sm" ? "type-secondary" : "type-body", variant === "filled" && "rounded-2xl rounded-br-md bg-primary/7 dark:bg-primary/15", variant === "filled" && (size === "sm" ? "px-3.5 py-2" : "px-4 py-2.5"), className),
|
|
14
14
|
...props
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -23,16 +23,16 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
23
23
|
button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-[var(--cell-size)] p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
24
24
|
button_next: cn(buttonVariants({ variant: buttonVariant }), "size-[var(--cell-size)] p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
25
25
|
month_caption: cn("flex h-[var(--cell-size)] w-full items-center justify-center px-[var(--cell-size)]", defaultClassNames.month_caption),
|
|
26
|
-
dropdowns: cn("flex h-[var(--cell-size)] w-full items-center justify-center gap-1.5
|
|
26
|
+
dropdowns: cn("flex h-[var(--cell-size)] w-full items-center justify-center gap-1.5 type-label", defaultClassNames.dropdowns),
|
|
27
27
|
dropdown_root: cn("relative rounded-md has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", defaultClassNames.dropdown_root),
|
|
28
28
|
dropdown: cn("absolute inset-0 opacity-0", defaultClassNames.dropdown),
|
|
29
|
-
caption_label: cn("
|
|
29
|
+
caption_label: cn("type-label select-none", captionLayout !== "label" && "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
30
30
|
table: "w-full border-collapse",
|
|
31
31
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
32
|
-
weekday: cn("flex-1 rounded-md
|
|
32
|
+
weekday: cn("flex-1 rounded-md type-caption text-muted-foreground select-none", defaultClassNames.weekday),
|
|
33
33
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
34
34
|
week_number_header: cn("w-[var(--cell-size)] select-none", defaultClassNames.week_number_header),
|
|
35
|
-
week_number: cn("
|
|
35
|
+
week_number: cn("type-caption text-muted-foreground select-none", defaultClassNames.week_number),
|
|
36
36
|
day: cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] [&:last-child[data-selected=true]_button]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", defaultClassNames.day),
|
|
37
37
|
range_start: cn("rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] bg-accent", defaultClassNames.range_start),
|
|
38
38
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
@@ -96,7 +96,7 @@ function CalendarDayButton({ className: dayClassName, day, modifiers, ...props }
|
|
|
96
96
|
className: cn(buttonVariants({
|
|
97
97
|
variant: "ghost",
|
|
98
98
|
size: "icon"
|
|
99
|
-
}), "flex aspect-square size-auto w-full min-w-[var(--cell-size)] flex-col gap-1 leading-none font-normal rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50", "data-[range-end=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground", "data-[range-start=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground", "[&>span]:
|
|
99
|
+
}), "flex aspect-square size-auto w-full min-w-[var(--cell-size)] flex-col gap-1 leading-none font-normal rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50", "data-[range-end=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground", "data-[range-start=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground", "[&>span]:type-caption [&>span]:opacity-70", dayClassName),
|
|
100
100
|
...props
|
|
101
101
|
});
|
|
102
102
|
}
|
|
@@ -24,7 +24,7 @@ function AnimatedCard({ type, iconSize, transparent = true, children, actions, c
|
|
|
24
24
|
width: iconSize
|
|
25
25
|
}) : null,
|
|
26
26
|
children != null && /* @__PURE__ */ jsx("div", {
|
|
27
|
-
className: "
|
|
27
|
+
className: "type-body text-foreground w-full",
|
|
28
28
|
children: typeof children === "string" ? /* @__PURE__ */ jsx("p", {
|
|
29
29
|
className: "text-center font-medium",
|
|
30
30
|
children
|
|
@@ -8,10 +8,10 @@ var content = (icon, primaryText, secondaryText) => /* @__PURE__ */ jsxs(Fragmen
|
|
|
8
8
|
}) }), /* @__PURE__ */ jsxs("div", {
|
|
9
9
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
10
10
|
children: [primaryText != null && /* @__PURE__ */ jsx("span", {
|
|
11
|
-
className: "
|
|
11
|
+
className: "type-heading",
|
|
12
12
|
children: primaryText
|
|
13
13
|
}), secondaryText != null && /* @__PURE__ */ jsx("span", {
|
|
14
|
-
className: "truncate
|
|
14
|
+
className: "truncate type-secondary text-muted-foreground",
|
|
15
15
|
children: secondaryText
|
|
16
16
|
})]
|
|
17
17
|
})] });
|
|
@@ -35,7 +35,7 @@ function CollapsibleCard({ children, className, defaultOpen = false, radius, ele
|
|
|
35
35
|
type: "button",
|
|
36
36
|
className: "flex w-full min-w-0 items-center justify-between gap-2 rounded-md text-left outline-none ring-offset-background transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
37
37
|
children: [/* @__PURE__ */ jsx("div", {
|
|
38
|
-
className: "min-w-0 flex-1 [&>div]:
|
|
38
|
+
className: "min-w-0 flex-1 [&>div]:type-heading [&>div]:font-medium",
|
|
39
39
|
children: titleChild
|
|
40
40
|
}), /* @__PURE__ */ jsxs("div", {
|
|
41
41
|
className: "flex h-4 w-4 shrink-0 items-center justify-center",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
4
|
-
export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from '../../section-card-
|
|
4
|
+
export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from '../../section-card-DqQeQkzU.js';
|
|
5
5
|
import '../../index-BQANnKs9.js';
|
|
6
|
-
import '../../variant-
|
|
6
|
+
import '../../variant-DjdaxfIA.js';
|
|
7
7
|
|
|
8
8
|
interface SimpleCardProps extends StyleAxisProps {
|
|
9
9
|
/** No shadow. Same as `elevation="none"`; `elevation` wins when both are set. */
|
|
@@ -14,11 +14,11 @@ function NoDataCard({ illustration, hideIllustration = false, heading, descripti
|
|
|
14
14
|
children: illustration ?? /* @__PURE__ */ jsx(Illustration, { type: "no-search-results" })
|
|
15
15
|
}),
|
|
16
16
|
heading != null && /* @__PURE__ */ jsx("div", {
|
|
17
|
-
className: "
|
|
17
|
+
className: "type-heading",
|
|
18
18
|
children: heading
|
|
19
19
|
}),
|
|
20
20
|
description != null && /* @__PURE__ */ jsx("p", {
|
|
21
|
-
className: "
|
|
21
|
+
className: "type-body text-muted-foreground",
|
|
22
22
|
children: description
|
|
23
23
|
}),
|
|
24
24
|
action != null && /* @__PURE__ */ jsx("div", { children: action })
|