@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
package/dist/core/input/input.js
CHANGED
|
@@ -5,9 +5,9 @@ import * as React$1 from "react";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/core/input/input.tsx
|
|
7
7
|
var sizeClasses = {
|
|
8
|
-
sm: "h-[var(--espd-control-height-sm,calc(var(--spacing)*8))] px-2
|
|
9
|
-
default: "h-[var(--espd-control-height-lg,calc(var(--spacing)*10))] px-3 py-2
|
|
10
|
-
lg: "h-12 px-4
|
|
8
|
+
sm: "h-[var(--espd-control-height-sm,calc(var(--spacing)*8))] px-2 type-input",
|
|
9
|
+
default: "h-[var(--espd-control-height-lg,calc(var(--spacing)*10))] px-3 py-2 type-input",
|
|
10
|
+
lg: "h-12 px-4 type-input"
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* An add-on segment beside the field. A text add-on is a padded box. An
|
|
@@ -19,7 +19,7 @@ var sizeClasses = {
|
|
|
19
19
|
*/
|
|
20
20
|
function addOnClassName(side, action, full) {
|
|
21
21
|
const start = side === "start";
|
|
22
|
-
return cn("border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background", start ? "-me-px" : "-ms-px", start && (full ? "rounded-s-full" : "rounded-s-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-lg)))]"), !start && (full ? "rounded-e-full" : "rounded-e-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-lg)))]"), action ? "relative flex shrink-0 overflow-hidden has-[:focus-visible]:z-20 has-[:focus-visible]:border-ring [&>*]:h-auto! [&>*]:self-stretch [&>*]:rounded-none! [&>*]:px-3! [&>*]:shadow-none! [&>*:focus-visible]:ring-1! [&>*:focus-visible]:ring-inset! [&>*:focus-visible]:ring-offset-0!" : "inline-flex items-center px-3
|
|
22
|
+
return cn("border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background", start ? "-me-px" : "-ms-px", start && (full ? "rounded-s-full" : "rounded-s-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-lg)))]"), !start && (full ? "rounded-e-full" : "rounded-e-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-lg)))]"), action ? "relative flex shrink-0 overflow-hidden has-[:focus-visible]:z-20 has-[:focus-visible]:border-ring [&>*]:h-auto! [&>*]:self-stretch [&>*]:rounded-none! [&>*]:px-3! [&>*]:shadow-none! [&>*:focus-visible]:ring-1! [&>*:focus-visible]:ring-inset! [&>*:focus-visible]:ring-offset-0!" : "inline-flex items-center px-3 type-input text-muted-foreground");
|
|
23
23
|
}
|
|
24
24
|
var Input = React$1.forwardRef(({ className, type, label, size, rounded, startHelperContent, endHelperContent, hintContent, error, errorContent, startIcon, endIcon, startAddOnContent, endAddOnContent, startAddOn, endAddOn, startAddOnAction, endAddOnAction, floatingLabel, charLimit, onChange, value, defaultValue, id, required, placeholder, radius, border, style, ...restProps }, ref) => {
|
|
25
25
|
const autoId = React$1.useId();
|
|
@@ -41,7 +41,7 @@ var Input = React$1.forwardRef(({ className, type, label, size, rounded, startHe
|
|
|
41
41
|
if (!(label !== void 0 || size !== void 0 || rounded !== void 0 || startHelperContent !== void 0 || endHelperContent !== void 0 || hintContent !== void 0 || error !== void 0 || errorContent !== void 0 || startIcon !== void 0 || endIcon !== void 0 || startAddOnContent !== void 0 || endAddOnContent !== void 0 || startAddOn !== void 0 || endAddOn !== void 0 || startAddOnAction !== void 0 || endAddOnAction !== void 0 || floatingLabel !== void 0 || charLimit !== void 0)) return /* @__PURE__ */ jsx("input", {
|
|
42
42
|
type,
|
|
43
43
|
id,
|
|
44
|
-
className: cn("flex h-[var(--espd-control-height-lg,calc(var(--spacing)*10))] w-full rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))] border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background px-3 py-2
|
|
44
|
+
className: cn("flex h-[var(--espd-control-height-lg,calc(var(--spacing)*10))] w-full rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))] border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background px-3 py-2 type-input ring-offset-background transition-[box-shadow,border-color] duration-[var(--espd-duration-normal,200ms)] ease-in-out file:border-0 file:bg-transparent file:type-label file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 read-only:bg-muted", className),
|
|
45
45
|
ref,
|
|
46
46
|
onChange,
|
|
47
47
|
value,
|
|
@@ -77,7 +77,7 @@ var Input = React$1.forwardRef(({ className, type, label, size, rounded, startHe
|
|
|
77
77
|
type,
|
|
78
78
|
id: inputId,
|
|
79
79
|
ref,
|
|
80
|
-
className: cn("flex w-full border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-[var(--espd-duration-normal,200ms)] ease-in-out file:border-0 file:bg-transparent file:
|
|
80
|
+
className: cn("flex w-full border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-[var(--espd-duration-normal,200ms)] ease-in-out file:border-0 file:bg-transparent file:type-label file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 read-only:bg-muted z-10", floatingLabel ? "h-12 px-3 pt-4 pb-1 type-input" : sizeClasses[effectiveSize], rounded && radius === void 0 ? "rounded-full" : "rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))]", hasError && "border-destructive focus-visible:ring-destructive", startIcon && "ps-9", endIcon && "pe-9", charLimit !== void 0 && !endIcon && "pe-14", charLimit !== void 0 && endIcon && "pe-20", startAddOnNode != null && "rounded-s-none shadow-none", endAddOnNode != null && "rounded-e-none shadow-none", hasAddOn && "focus-visible:ring-0 focus-visible:ring-offset-0", "peer", floatingLabel && "placeholder:text-transparent", className),
|
|
81
81
|
required,
|
|
82
82
|
"aria-invalid": hasError || void 0,
|
|
83
83
|
"aria-describedby": describedBy,
|
|
@@ -101,7 +101,7 @@ var Input = React$1.forwardRef(({ className, type, label, size, rounded, startHe
|
|
|
101
101
|
(endIcon || charLimit !== void 0) && /* @__PURE__ */ jsxs("div", {
|
|
102
102
|
className: "pointer-events-none absolute inset-y-0 end-0 flex items-center justify-center gap-2 pe-3 text-muted-foreground/80 peer-disabled:opacity-50",
|
|
103
103
|
children: [charLimit !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
104
|
-
className: "
|
|
104
|
+
className: "type-caption tabular-nums text-muted-foreground",
|
|
105
105
|
children: [
|
|
106
106
|
charCount,
|
|
107
107
|
"/",
|
|
@@ -111,7 +111,7 @@ var Input = React$1.forwardRef(({ className, type, label, size, rounded, startHe
|
|
|
111
111
|
}),
|
|
112
112
|
floatingLabel && label && /* @__PURE__ */ jsxs("label", {
|
|
113
113
|
htmlFor: inputId,
|
|
114
|
-
className: "absolute start-2 top-0 z-10 block -translate-y-1/2 bg-background px-2
|
|
114
|
+
className: "absolute start-2 top-0 z-10 block -translate-y-1/2 bg-background px-2 type-caption font-medium text-foreground/70 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:type-input peer-placeholder-shown:font-normal peer-focus:top-0 peer-focus:type-caption peer-focus:font-medium",
|
|
115
115
|
children: [label, required && /* @__PURE__ */ jsx("span", {
|
|
116
116
|
className: "text-destructive",
|
|
117
117
|
children: " *"
|
|
@@ -152,17 +152,17 @@ var Input = React$1.forwardRef(({ className, type, label, size, rounded, startHe
|
|
|
152
152
|
inputContainer,
|
|
153
153
|
errorContent && /* @__PURE__ */ jsx("div", {
|
|
154
154
|
id: `${inputId}-error`,
|
|
155
|
-
className: "
|
|
155
|
+
className: "type-caption text-destructive",
|
|
156
156
|
children: errorContent
|
|
157
157
|
}),
|
|
158
158
|
startHelperContent && !errorContent && /* @__PURE__ */ jsx("div", {
|
|
159
159
|
id: helperStartId,
|
|
160
|
-
className: "
|
|
160
|
+
className: "type-caption text-muted-foreground",
|
|
161
161
|
children: startHelperContent
|
|
162
162
|
}),
|
|
163
163
|
endHelperContent && !errorContent && /* @__PURE__ */ jsx("div", {
|
|
164
164
|
id: helperEndId,
|
|
165
|
-
className: "
|
|
165
|
+
className: "type-caption text-end text-muted-foreground",
|
|
166
166
|
children: endHelperContent
|
|
167
167
|
})
|
|
168
168
|
]
|
|
@@ -11,15 +11,15 @@ var LENGTH_MIN = 2;
|
|
|
11
11
|
var LENGTH_MAX = 12;
|
|
12
12
|
var LENGTH_DEFAULT = 6;
|
|
13
13
|
var slotSizeClasses = {
|
|
14
|
-
sm: "h-8 w-8
|
|
15
|
-
default: "h-10 w-10
|
|
16
|
-
lg: "h-12 w-12
|
|
14
|
+
sm: "h-8 w-8 type-input",
|
|
15
|
+
default: "h-10 w-10 type-input",
|
|
16
|
+
lg: "h-12 w-12 type-input"
|
|
17
17
|
};
|
|
18
|
-
/** Expanded mode: keep the height and
|
|
18
|
+
/** Expanded mode: keep the height and text role but let the slot flex-grow. */
|
|
19
19
|
var slotExpandedSizeClasses = {
|
|
20
|
-
sm: "h-8
|
|
21
|
-
default: "h-10
|
|
22
|
-
lg: "h-12
|
|
20
|
+
sm: "h-8 type-input",
|
|
21
|
+
default: "h-10 type-input",
|
|
22
|
+
lg: "h-12 type-input"
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Standalone visual divider used between OTP slot groups. Exported for callers
|
|
@@ -120,12 +120,12 @@ var InputOTP = React$1.forwardRef(({ length, allowAlphaNumeric, regex, separator
|
|
|
120
120
|
children: "*"
|
|
121
121
|
})]
|
|
122
122
|
}), hintContent && /* @__PURE__ */ jsx("span", {
|
|
123
|
-
className: "
|
|
123
|
+
className: "type-caption text-muted-foreground",
|
|
124
124
|
children: hintContent
|
|
125
125
|
})]
|
|
126
126
|
}),
|
|
127
127
|
!label && hintContent && /* @__PURE__ */ jsx("span", {
|
|
128
|
-
className: "
|
|
128
|
+
className: "type-caption text-muted-foreground",
|
|
129
129
|
children: hintContent
|
|
130
130
|
}),
|
|
131
131
|
/* @__PURE__ */ jsx(OTPInput, {
|
|
@@ -166,17 +166,17 @@ var InputOTP = React$1.forwardRef(({ length, allowAlphaNumeric, regex, separator
|
|
|
166
166
|
}),
|
|
167
167
|
errorContent && /* @__PURE__ */ jsx("div", {
|
|
168
168
|
id: `${inputId}-error`,
|
|
169
|
-
className: "
|
|
169
|
+
className: "type-caption text-destructive",
|
|
170
170
|
children: errorContent
|
|
171
171
|
}),
|
|
172
172
|
startHelperContent && !errorContent && /* @__PURE__ */ jsx("div", {
|
|
173
173
|
id: helperStartId,
|
|
174
|
-
className: "
|
|
174
|
+
className: "type-caption text-muted-foreground",
|
|
175
175
|
children: startHelperContent
|
|
176
176
|
}),
|
|
177
177
|
endHelperContent && !errorContent && /* @__PURE__ */ jsx("div", {
|
|
178
178
|
id: helperEndId,
|
|
179
|
-
className: "
|
|
179
|
+
className: "type-caption text-end text-muted-foreground",
|
|
180
180
|
children: endHelperContent
|
|
181
181
|
})
|
|
182
182
|
]
|
package/dist/core/label.js
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
6
6
|
//#region src/core/label.tsx
|
|
7
|
-
var labelVariants = cva("
|
|
7
|
+
var labelVariants = cva("type-label leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
8
8
|
var Label = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, {
|
|
9
9
|
ref,
|
|
10
10
|
className: cn(labelVariants(), className),
|
package/dist/core/select.js
CHANGED
|
@@ -10,9 +10,9 @@ var Select = SelectPrimitive.Root;
|
|
|
10
10
|
var SelectGroup = SelectPrimitive.Group;
|
|
11
11
|
var SelectValue = SelectPrimitive.Value;
|
|
12
12
|
var triggerSizeClasses = {
|
|
13
|
-
sm: "h-[var(--espd-control-height-sm,calc(var(--spacing)*8))] px-3
|
|
14
|
-
default: "h-[var(--espd-control-height-lg,calc(var(--spacing)*10))] px-3.5 py-2
|
|
15
|
-
lg: "h-12 px-5
|
|
13
|
+
sm: "h-[var(--espd-control-height-sm,calc(var(--spacing)*8))] px-3 type-input",
|
|
14
|
+
default: "h-[var(--espd-control-height-lg,calc(var(--spacing)*10))] px-3.5 py-2 type-input",
|
|
15
|
+
lg: "h-12 px-5 type-input"
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* Fixed 16px like the decorators inside `Input` (`startIcon` / `endIcon`
|
|
@@ -66,7 +66,7 @@ var SelectTrigger = React$1.forwardRef(({ className, children, size = "default",
|
|
|
66
66
|
trigger,
|
|
67
67
|
errorContent && /* @__PURE__ */ jsx("div", {
|
|
68
68
|
id: errorId,
|
|
69
|
-
className: "
|
|
69
|
+
className: "type-caption text-destructive",
|
|
70
70
|
children: errorContent
|
|
71
71
|
})
|
|
72
72
|
]
|
|
@@ -128,13 +128,13 @@ var SelectContent = React$1.forwardRef(({ className, children, position = "poppe
|
|
|
128
128
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
129
129
|
var SelectLabel = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, {
|
|
130
130
|
ref,
|
|
131
|
-
className: cn("px-2.5 py-2
|
|
131
|
+
className: cn("px-2.5 py-2 type-subheading", className),
|
|
132
132
|
...props
|
|
133
133
|
}));
|
|
134
134
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
135
135
|
var SelectItem = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
136
136
|
ref,
|
|
137
|
-
className: cn("relative flex w-full cursor-default select-none items-center rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-sm)))] py-2 pl-2.5 pr-9
|
|
137
|
+
className: cn("relative flex w-full cursor-default select-none items-center rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-sm)))] py-2 pl-2.5 pr-9 type-label outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
138
138
|
...props,
|
|
139
139
|
children: [/* @__PURE__ */ jsx("span", {
|
|
140
140
|
className: "absolute right-2.5 flex h-3.5 w-3.5 items-center justify-center",
|
package/dist/core/separator.js
CHANGED
|
@@ -25,7 +25,7 @@ var Separator = React$1.forwardRef(({ className, orientation = "horizontal", dec
|
|
|
25
25
|
className: cn("shrink-0 bg-border flex-1", isHorizontal ? "h-[1px]" : "w-[1px]")
|
|
26
26
|
}),
|
|
27
27
|
/* @__PURE__ */ jsx("span", {
|
|
28
|
-
className: cn("
|
|
28
|
+
className: cn("type-caption font-medium text-muted-foreground shrink-0 select-none", !isHorizontal && stackLabel && "[writing-mode:vertical-lr] [text-orientation:upright]", labelClassName),
|
|
29
29
|
children: label
|
|
30
30
|
}),
|
|
31
31
|
/* @__PURE__ */ jsx("div", {
|
package/dist/core/table.js
CHANGED
|
@@ -10,7 +10,7 @@ var Table = React$1.forwardRef(({ className, containerRef, containerClassName, d
|
|
|
10
10
|
className: cn("relative w-full overflow-auto", containerClassName),
|
|
11
11
|
children: /* @__PURE__ */ jsx("table", {
|
|
12
12
|
ref,
|
|
13
|
-
className: cn("w-full caption-bottom
|
|
13
|
+
className: cn("w-full caption-bottom type-body", className),
|
|
14
14
|
...props
|
|
15
15
|
})
|
|
16
16
|
}));
|
|
@@ -53,7 +53,7 @@ var TableCell = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
53
53
|
TableCell.displayName = "TableCell";
|
|
54
54
|
var TableCaption = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", {
|
|
55
55
|
ref,
|
|
56
|
-
className: cn("mt-4
|
|
56
|
+
className: cn("mt-4 type-body text-muted-foreground", className),
|
|
57
57
|
...props
|
|
58
58
|
}));
|
|
59
59
|
TableCaption.displayName = "TableCaption";
|
|
@@ -3,11 +3,11 @@ import { useStyleAxes } from "../../utils/style-axes.js";
|
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/core/textarea/textarea.tsx
|
|
6
|
-
var labelClasses = "flex items-center gap-2
|
|
6
|
+
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";
|
|
7
7
|
var sizeClasses = {
|
|
8
|
-
sm: "min-h-[60px] px-2 py-1.5
|
|
9
|
-
default: "min-h-[80px] px-3 py-2
|
|
10
|
-
lg: "min-h-[100px] px-4 py-3
|
|
8
|
+
sm: "min-h-[60px] px-2 py-1.5 type-input",
|
|
9
|
+
default: "min-h-[80px] px-3 py-2 type-input",
|
|
10
|
+
lg: "min-h-[100px] px-4 py-3 type-input"
|
|
11
11
|
};
|
|
12
12
|
var Textarea = React$1.forwardRef(({ className, label, size = "default", hintContent, error, errorContent, charLimit, onChange, value, defaultValue, id, required, placeholder, radius, border, style, ...restProps }, ref) => {
|
|
13
13
|
const autoId = React$1.useId();
|
|
@@ -51,7 +51,7 @@ var Textarea = React$1.forwardRef(({ className, label, size = "default", hintCon
|
|
|
51
51
|
if (!hasEnhancedProps) return /* @__PURE__ */ jsx("textarea", {
|
|
52
52
|
ref,
|
|
53
53
|
id,
|
|
54
|
-
className: cn("flex min-h-[60px] w-full rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))] border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background px-3 py-2
|
|
54
|
+
className: cn("flex min-h-[60px] w-full rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))] border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background px-3 py-2 type-input ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-y", className),
|
|
55
55
|
required,
|
|
56
56
|
placeholder,
|
|
57
57
|
value,
|
|
@@ -73,18 +73,18 @@ var Textarea = React$1.forwardRef(({ className, label, size = "default", hintCon
|
|
|
73
73
|
children: "*"
|
|
74
74
|
})]
|
|
75
75
|
}), hintContent != null && /* @__PURE__ */ jsx("span", {
|
|
76
|
-
className: "
|
|
76
|
+
className: "type-caption text-muted-foreground",
|
|
77
77
|
children: hintContent
|
|
78
78
|
})]
|
|
79
79
|
}),
|
|
80
80
|
!label && hintContent != null && /* @__PURE__ */ jsx("span", {
|
|
81
|
-
className: "
|
|
81
|
+
className: "type-caption text-muted-foreground",
|
|
82
82
|
children: hintContent
|
|
83
83
|
}),
|
|
84
84
|
/* @__PURE__ */ jsxs("div", {
|
|
85
85
|
className: "relative",
|
|
86
86
|
children: [textareaElement, charLimit !== void 0 && /* @__PURE__ */ jsxs("div", {
|
|
87
|
-
className: "absolute bottom-2 end-2
|
|
87
|
+
className: "absolute bottom-2 end-2 type-caption tabular-nums text-muted-foreground pointer-events-none",
|
|
88
88
|
children: [
|
|
89
89
|
charCount,
|
|
90
90
|
"/",
|
|
@@ -94,7 +94,7 @@ var Textarea = React$1.forwardRef(({ className, label, size = "default", hintCon
|
|
|
94
94
|
}),
|
|
95
95
|
errorContent != null && /* @__PURE__ */ jsx("div", {
|
|
96
96
|
id: `${textareaId}-error`,
|
|
97
|
-
className: "
|
|
97
|
+
className: "type-caption text-destructive",
|
|
98
98
|
children: errorContent
|
|
99
99
|
})
|
|
100
100
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { C as Color } from './index-BQANnKs9.js';
|
|
3
|
-
import { f as Variant } from './variant-
|
|
3
|
+
import { f as Variant } from './variant-DjdaxfIA.js';
|
|
4
4
|
|
|
5
5
|
type IconAvatarVariant = "legacy" | Variant;
|
|
6
6
|
interface IconAvatarRingProps {
|
package/dist/{icon-text-action-card.props-B2ggncUK.d.ts → icon-text-action-card.props-BU7yFi2Q.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { C as Color, S as Size } from './index-BQANnKs9.js';
|
|
3
|
-
import { f as Variant } from './variant-
|
|
3
|
+
import { f as Variant } from './variant-DjdaxfIA.js';
|
|
4
4
|
import { k as StyleAxisProps } from './style-axes-DSQ2DGc5.js';
|
|
5
|
-
import { b as IconAvatarVariant } from './icon-avatar.props-
|
|
5
|
+
import { b as IconAvatarVariant } from './icon-avatar.props-BJe0-vva.js';
|
|
6
6
|
|
|
7
7
|
type IconTextActionCardVariant = Variant;
|
|
8
8
|
type IconTextActionCardActionsPlacement = "auto" | "below";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AppName, C as Color, P as PresetColor, S as Size } from './index-BQANnKs9.js';
|
|
2
|
-
export { P as PRESET_GRADIENT_BACKDROP, a as PRESET_GRADIENT_FRAME, V as VARIANTS, b as VARIANT_GRADIENT_BACKDROP_BASE, c as VARIANT_GRADIENT_DURATION_CLASS, d as VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, e as VARIANT_GRADIENT_TRANSITION_DURATION_MS, f as Variant, g as VariantRecipe, h as VariantRegistry, i as VariantStyles, j as arbitraryGradientBackgroundImage, l as listVariants, r as registerVariant, k as resolveVariantStyles } from './variant-
|
|
2
|
+
export { P as PRESET_GRADIENT_BACKDROP, a as PRESET_GRADIENT_FRAME, V as VARIANTS, b as VARIANT_GRADIENT_BACKDROP_BASE, c as VARIANT_GRADIENT_DURATION_CLASS, d as VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, e as VARIANT_GRADIENT_TRANSITION_DURATION_MS, f as Variant, g as VariantRecipe, h as VariantRegistry, i as VariantStyles, j as arbitraryGradientBackgroundImage, l as listVariants, r as registerVariant, k as resolveVariantStyles } from './variant-DjdaxfIA.js';
|
|
3
3
|
export { B as BORDERS, a as Border, b as BorderRegistry, D as DENSITIES, c as Density, d as DensityProps, e as DensityRegistry, f as DensityTokens, E as ELEVATIONS, g as Elevation, h as ElevationRegistry, R as RADII, i as Radius, j as RadiusRegistry, S as StyleAxis, k as StyleAxisProps, l as StyleValueAxis, m as densityStyle, n as listStyleValues, r as registerDensity, o as registerStyleValue, p as resolveDensity, q as resolveStyleValue, u as useStyleAxes } from './style-axes-DSQ2DGc5.js';
|
|
4
4
|
export { StyleRole, StyleScope, StyleScopeProps } from './components/style-scope/index.js';
|
|
5
5
|
export { TruncatedLineWithTooltip, TruncatedLineWithTooltipProps } from './components/truncated-line-with-tooltip/index.js';
|
|
@@ -34,6 +34,7 @@ export { ViewMode, ViewToggle, ViewToggleLabels, ViewToggleProps } from './compo
|
|
|
34
34
|
export { Toolbar, ToolbarButton, ToolbarButtonProps, ToolbarProps } from './components/toolbar/index.js';
|
|
35
35
|
export { AnchoredPanel, AnchoredPanelProps } from './components/anchored-panel/index.js';
|
|
36
36
|
export { FloatingWindow, FloatingWindowPosition, FloatingWindowProps } from './components/floating-window/index.js';
|
|
37
|
+
export { BottomSheet, BottomSheetLabels, BottomSheetProps, SheetRest, settleSheet } from './components/bottom-sheet/index.js';
|
|
37
38
|
export { NoticeStrip, NoticeStripProps, NoticeTone } from './components/notice-strip/index.js';
|
|
38
39
|
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleContentProps, TraceCollapsibleProps, TraceCollapsibleTrigger, TraceCollapsibleTriggerProps, TraceDescription, TraceDescriptionProps, TraceIcon, TraceIconProps, TraceLine, TraceLineProps, TraceProps, TraceStatus, TraceTitle, TraceTitleProps } from './components/trace/index.js';
|
|
39
40
|
export { Readout, ReadoutProps, ReadoutSegment } from './components/readout/index.js';
|
|
@@ -65,6 +66,7 @@ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScro
|
|
|
65
66
|
export { B as Button, a as ButtonIconOnlyBreakpoint, b as ButtonProps } from './button-BxJ7s6sR.js';
|
|
66
67
|
export { CopyButton, CopyButtonProps, FlashButton, FlashButtonProps, InvertButton, InvertButtonProps } from './components/button/index.js';
|
|
67
68
|
export { ReactionButton, ReactionButtonProps } from './components/reaction-button/index.js';
|
|
69
|
+
export { GradientRing, GradientRingButton, GradientRingButtonProps, GradientRingProps } from './components/gradient-ring-button/index.js';
|
|
68
70
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from './components/button-group/index.js';
|
|
69
71
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/card/index.js';
|
|
70
72
|
export { AreaChart, AreaChartProps, BarChart, BarChartProps, BarSize, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, ChartCategoryColorKey, ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartLegendLayout, ChartLegendList, ChartLegendListItem, ChartLegendListProps, ChartLegendOptions, ChartLegendValue, ChartSeriesColorKey, ChartStyle, ChartTooltip, ChartTooltipContent, ComposedChart, ComposedChartProps, ComposedChartSeries, DEFAULT_CHART_SERIES_COLORS, DonutChart, DonutChartProps, DonutDatum, LineChart, LineChartProps, LineStrokeWidth, TreemapAnimationEasing, TreemapChart, TreemapChartProps, TreemapDatum, TreemapTileLabelStyle, buildSeriesChartConfig, getChartSeriesColor } from './components/chart/index.js';
|
|
@@ -107,12 +109,12 @@ export { ShareMenu, ShareMenuLabels, ShareMenuProps, ShareTarget } from './compo
|
|
|
107
109
|
export { Timeline, TimelineItem, TimelineLabels, TimelineProps } from './components/timeline/index.js';
|
|
108
110
|
export { Identicon, IdenticonProps } from './components/identicon/index.js';
|
|
109
111
|
export { IconAvatar } from './components/icon-avatar/index.js';
|
|
110
|
-
export { I as IconAvatarProps, a as IconAvatarRingProps, b as IconAvatarVariant } from './icon-avatar.props-
|
|
112
|
+
export { I as IconAvatarProps, a as IconAvatarRingProps, b as IconAvatarVariant } from './icon-avatar.props-BJe0-vva.js';
|
|
111
113
|
export { Illustration, IllustrationProps, IllustrationType, illustrationRegistry, illustrationsById, parseSvgViewBoxAspectRatio } from './components/illustration/index.js';
|
|
112
114
|
export { Badge, BadgeProps, badgeVariants } from './components/badge/index.js';
|
|
113
115
|
export { UserType, UserTypeBadge, UserTypeBadgeProps, UserTypeBadgeRegistryItem, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes } from './components/user-type-badge/index.js';
|
|
114
116
|
export { StatusBadge, statusBadgeSizeVariants } from './components/status-badge/index.js';
|
|
115
|
-
export { S as StatusBadgeIcon, a as StatusBadgeProps } from './status-badge.props-
|
|
117
|
+
export { S as StatusBadgeIcon, a as StatusBadgeProps } from './status-badge.props-BVe8CmQZ.js';
|
|
116
118
|
export { Tag, TagProps } from './components/tag/index.js';
|
|
117
119
|
export { TagInput, TagInputProps } from './components/tag-input/index.js';
|
|
118
120
|
export { TransferItem, TransferList, TransferListProps } from './components/transfer-list/index.js';
|
|
@@ -132,7 +134,7 @@ export { RequirementList, RequirementListItem, RequirementListProps, Requirement
|
|
|
132
134
|
export { SimpleList, SimpleListAvatarSize, SimpleListIconStyle, SimpleListItem, SimpleListItemDirection, SimpleListProps } from './components/simple-list/index.js';
|
|
133
135
|
export { SimplePaginatedList, SimplePaginatedListItem, SimplePaginatedListProps, SimplePaginatedListSize } from './components/simple-paginated-list/index.js';
|
|
134
136
|
export { Alert } from './components/alert/index.js';
|
|
135
|
-
export { A as AlertColor, a as AlertIconAvatarVariant, b as AlertProps, c as AlertSize, d as AlertType, e as AlertVariant } from './alert.props-
|
|
137
|
+
export { A as AlertColor, a as AlertIconAvatarVariant, b as AlertProps, c as AlertSize, d as AlertType, e as AlertVariant } from './alert.props-BuLuWmXA.js';
|
|
136
138
|
export { Toast, ToastColor, ToastId, ToastInput, ToastOptions, ToastProps, ToastToasterProps, ToastType, ToastVariant, Toaster, toast } from './components/toast/index.js';
|
|
137
139
|
export { MarkdownContent, MarkdownContentProps } from './components/markdown-content/index.js';
|
|
138
140
|
export { MonospaceContent, MonospaceContentProps } from './components/monospace-content/index.js';
|
|
@@ -145,11 +147,11 @@ export { CircularProgress, CircularProgressProps } from './components/circular-p
|
|
|
145
147
|
export { ProgressBar, ProgressBarProps, ProgressBarSegment } from './components/progress-bar/index.js';
|
|
146
148
|
export { FullSizeError, FullSizeErrorProps, InlineError, InlineErrorProps } from './components/error-display/index.js';
|
|
147
149
|
export { AnimatedCard, AnimatedCardProps, AnimatedCardType, BasicDetailsCard, BasicDetailsCardProps, CollapsibleCard, CollapsibleCardProps, NoDataCard, NoDataCardProps, SimpleCard, SimpleCardProps, animatedCardAnimations, animatedCardTypeKeys } from './components/cards/index.js';
|
|
148
|
-
export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from './section-card-
|
|
150
|
+
export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from './section-card-DqQeQkzU.js';
|
|
149
151
|
export { IconTextActionCard } from './components/icon-text-action-card/index.js';
|
|
150
|
-
export { I as IconTextActionCardActionsPlacement, a as IconTextActionCardProps, b as IconTextActionCardVariant } from './icon-text-action-card.props-
|
|
152
|
+
export { I as IconTextActionCardActionsPlacement, a as IconTextActionCardProps, b as IconTextActionCardVariant } from './icon-text-action-card.props-BU7yFi2Q.js';
|
|
151
153
|
export { SimpleClickableCard } from './components/simple-clickable-card/index.js';
|
|
152
|
-
export { S as SimpleClickableCardProps, a as SimpleClickableCardSharedProps, b as SimpleClickableCardVariant } from './simple-clickable-card.props-
|
|
154
|
+
export { S as SimpleClickableCardProps, a as SimpleClickableCardSharedProps, b as SimpleClickableCardVariant } from './simple-clickable-card.props-BhhotZMp.js';
|
|
153
155
|
export { CategoryCard, CategoryCardProps } from './components/category-card/index.js';
|
|
154
156
|
export { SimpleInfoCard, SimpleInfoCardProps } from './components/simple-info-card/index.js';
|
|
155
157
|
export { GlitchText, GlitchTextProps, GradientText, GradientTextProps, HighlightText, HighlightTextProps, ShimmeringText, ShimmeringTextProps, parseTextMarkup } from './components/text-effects/index.js';
|
package/dist/index.js
CHANGED
|
@@ -67,6 +67,8 @@ import { ToolbarButton } from "./components/toolbar/toolbar-button.js";
|
|
|
67
67
|
import { Badge, badgeVariants } from "./core/badge.js";
|
|
68
68
|
import { AnchoredPanel } from "./components/anchored-panel/anchored-panel.js";
|
|
69
69
|
import { FloatingWindow } from "./components/floating-window/floating-window.js";
|
|
70
|
+
import { settleSheet } from "./components/bottom-sheet/_hooks/use-sheet-drag.js";
|
|
71
|
+
import { BottomSheet } from "./components/bottom-sheet/bottom-sheet.js";
|
|
70
72
|
import { IconTextActionCard } from "./components/icon-text-action-card/icon-text-action-card.js";
|
|
71
73
|
import { Alert } from "./components/alert/alert.js";
|
|
72
74
|
import { NoticeStrip } from "./components/notice-strip/notice-strip.js";
|
|
@@ -115,6 +117,8 @@ import { OptionCardGroup } from "./components/option-card-group/option-card-grou
|
|
|
115
117
|
import { StepTabs } from "./components/step-tabs/step-tabs.js";
|
|
116
118
|
import { StatCard } from "./components/stat-card/stat-card.js";
|
|
117
119
|
import { ReactionButton } from "./components/reaction-button/reaction-button.js";
|
|
120
|
+
import { GradientRing } from "./components/gradient-ring-button/gradient-ring.js";
|
|
121
|
+
import { GradientRingButton } from "./components/gradient-ring-button/gradient-ring-button.js";
|
|
118
122
|
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./core/button-group.js";
|
|
119
123
|
import { ChartContainer, ChartLegend, ChartLegendContent, ChartLegendList, ChartStyle, ChartTooltip, ChartTooltipContent } from "./components/chart/chart.js";
|
|
120
124
|
import { CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, DEFAULT_CHART_SERIES_COLORS, buildSeriesChartConfig, getChartSeriesColor } from "./components/chart/chart-colors.js";
|
|
@@ -200,7 +204,7 @@ import Header from "./layouts/workspace-layout/header/header.js";
|
|
|
200
204
|
import Footer from "./layouts/workspace-layout/footer/footer.js";
|
|
201
205
|
import AccountMenu from "./layouts/workspace-layout/account-menu/account-menu.js";
|
|
202
206
|
import WorkspaceLayout from "./layouts/workspace-layout/workspace-layout.js";
|
|
203
|
-
import MinimalWorkspaceLayout from "./layouts/minimal-workspace-layout/minimal-workspace-layout.js";
|
|
204
207
|
import { MinimalWorkspaceSidebarTrigger } from "./layouts/minimal-workspace-layout/sidebar-trigger.js";
|
|
208
|
+
import MinimalWorkspaceLayout from "./layouts/minimal-workspace-layout/minimal-workspace-layout.js";
|
|
205
209
|
import EntryLayout from "./layouts/entry-layout/entry-layout.js";
|
|
206
|
-
export { Accordion, AccountMenu, ActiveFilters, AdvancedSearchBox, Alert, AnchoredPanel, AnimatedCard, AnimatedRainmakerLogo, AppLogo, AreaChart, AsyncCombobox, AsyncMultiSelect, Avatar, AvatarGroup, BORDERS, Badge, BarChart, BasicDetailsCard, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardRail, CardTitle, Carousel, CategoryCard, ChartContainer, ChartLegend, ChartLegendContent, ChartLegendList, ChartStyle, ChartTooltip, ChartTooltipContent, CheckBadge, Checkbox, ChoiceCard, CircularProgress, Code, CodeEditor, Collapsible, CollapsibleCard, CollapsibleContent, CollapsibleTrigger, ColumnPanel, ComposedChart, ConfirmationDialog, ContentContainer, CopiableText, CopyButton, CopyrightCard, Coverflow, DEFAULT_CHART_SERIES_COLORS, DEFAULT_PAGE_SIZE_OPTIONS, DENSITIES, DataTable, DataTableRowActions, DatePicker, DateRangePicker, DateTimePicker, DeviceIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DonutChart, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicList, ELEVATIONS, EntryLayout, ExpandableText, FeatureGrid, FileInput, FileUpload, FilterGroup, FiltersBar, FiltersPanel, FiltersPill, FlashButton, FlipCard, FloatingWindow, FooterCard, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullSizeError, FullscreenDialog, GlitchText, GradientText, HighlightText, HorizontalStepper, IconAvatar, IconTextActionCard, Identicon, Illustration, InlineError, Input, InputGroup, InputGroupAddon, InputGroupTextarea, InputOTP, InputOTPSeparator, InputPassword, InvertButton, KeyValueManager, Keyframes, KeyframesMotion, LIST_CLASS_NAMES, Label, LineChart, Link, List, ListDetails, LottieAnimationContainer, MarkdownContent, MediaCard, MediaCardAction, MediaCardBody, MediaCardFooter, MediaCardImage, MediaCardLink, MediaCardMedia, MediaCardMeta, MediaCardReveal, MediaCardRevealChips, MediaCardRevealFooter, MediaCardRevealItem, MediaCardTitle, MediaStage, Menu, MessageScroller, MiniBarChart, MinimalWorkspaceLayout, MinimalWorkspaceSidebarTrigger, MonospaceContent, MyAccountMenu, NavBar, NoDataCard, NoticeStrip, OptionCardGroup, OverflowBadgeList, PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, PRESET_IDS, PRESET_LABELS, PageBanner, PageContainer, PageContainerSkeleton, PageLoader, Pagination, PopCollectionItem, Popover, PopoverAnchor, PopoverContent, PopoverGroup, PopoverTrigger, PreviewCard, PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger, ProfileCard, ProgressBar, QrCode, RADII, ROLLING_PRESET_IDS, RadioGroup, RangeField, RankNumeral, ReactionButton, Readout, RequirementList, ResizableGroup, ResizablePanel, ResizableSeparator, Reveal, ScrollArea, ScrollBar, ScrollableSections, SearchBox, SectionCard, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCardList, Separator, ShareMenu, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShimmeringText, ShowcaseCard, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, Sidebar$1 as SidebarPrimitive, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleCard, SimpleClickableCard, SimpleInfoCard, SimpleList, SimplePaginatedList, SimplifiedDate, Skeleton, SortMenu, Spinner, StatCard, StatusBadge, StatusCardList, StepTabs, StyleScope, Switch, TYPOGRAPHY_VARIANTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsContents, TabsList, TabsTrigger, Tag, TagInput, Textarea, ThumbnailStrip, TimePicker, Timeline, Toast, Toaster, TogglableItemsList, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, Tooltip, TooltipContent, TooltipProvider, Tooltip$1 as TooltipRoot, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TransferList, TreemapChart, TruncatedLineWithTooltip, Typography, UserTypeBadge, VARIANTS, VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_DURATION_CLASS, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, VARIANT_GRADIENT_TRANSITION_DURATION_MS, VerificationInProgress, VerticalStepper, ViewToggle, Footer as WorkspaceFooter, Header as WorkspaceHeader, WorkspaceLayout, animatedCardAnimations, animatedCardTypeKeys, arbitraryGradientBackgroundImage, badgeVariants, buildSeriesChartConfig, buttonGroupVariants, buttonVariants, cn, computeDateRange, densityStyle, easeOutSplines, getChartSeriesColor, illustrationRegistry, illustrationsById, isSidebarGroup, keyTimes, listStyleValues, listVariants, parseSvgViewBoxAspectRatio, parseTextMarkup, registerDensity, registerStyleValue, registerVariant, resolveDensity, resolveStyleValue, resolveVariantStyles, statusBadgeSizeVariants, supportsViewTransitions, toast, typographyDefaultElement, typographyVariantClasses, useControlledState, useFiltersCollapsed, useFormField, useIsMobile, usePanelFlag, useSidebar, useStyleAxes, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes };
|
|
210
|
+
export { Accordion, AccountMenu, ActiveFilters, AdvancedSearchBox, Alert, AnchoredPanel, AnimatedCard, AnimatedRainmakerLogo, AppLogo, AreaChart, AsyncCombobox, AsyncMultiSelect, Avatar, AvatarGroup, BORDERS, Badge, BarChart, BasicDetailsCard, BottomSheet, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardRail, CardTitle, Carousel, CategoryCard, ChartContainer, ChartLegend, ChartLegendContent, ChartLegendList, ChartStyle, ChartTooltip, ChartTooltipContent, CheckBadge, Checkbox, ChoiceCard, CircularProgress, Code, CodeEditor, Collapsible, CollapsibleCard, CollapsibleContent, CollapsibleTrigger, ColumnPanel, ComposedChart, ConfirmationDialog, ContentContainer, CopiableText, CopyButton, CopyrightCard, Coverflow, DEFAULT_CHART_SERIES_COLORS, DEFAULT_PAGE_SIZE_OPTIONS, DENSITIES, DataTable, DataTableRowActions, DatePicker, DateRangePicker, DateTimePicker, DeviceIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DonutChart, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicList, ELEVATIONS, EntryLayout, ExpandableText, FeatureGrid, FileInput, FileUpload, FilterGroup, FiltersBar, FiltersPanel, FiltersPill, FlashButton, FlipCard, FloatingWindow, FooterCard, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullSizeError, FullscreenDialog, GlitchText, GradientRing, GradientRingButton, GradientText, HighlightText, HorizontalStepper, IconAvatar, IconTextActionCard, Identicon, Illustration, InlineError, Input, InputGroup, InputGroupAddon, InputGroupTextarea, InputOTP, InputOTPSeparator, InputPassword, InvertButton, KeyValueManager, Keyframes, KeyframesMotion, LIST_CLASS_NAMES, Label, LineChart, Link, List, ListDetails, LottieAnimationContainer, MarkdownContent, MediaCard, MediaCardAction, MediaCardBody, MediaCardFooter, MediaCardImage, MediaCardLink, MediaCardMedia, MediaCardMeta, MediaCardReveal, MediaCardRevealChips, MediaCardRevealFooter, MediaCardRevealItem, MediaCardTitle, MediaStage, Menu, MessageScroller, MiniBarChart, MinimalWorkspaceLayout, MinimalWorkspaceSidebarTrigger, MonospaceContent, MyAccountMenu, NavBar, NoDataCard, NoticeStrip, OptionCardGroup, OverflowBadgeList, PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, PRESET_IDS, PRESET_LABELS, PageBanner, PageContainer, PageContainerSkeleton, PageLoader, Pagination, PopCollectionItem, Popover, PopoverAnchor, PopoverContent, PopoverGroup, PopoverTrigger, PreviewCard, PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger, ProfileCard, ProgressBar, QrCode, RADII, ROLLING_PRESET_IDS, RadioGroup, RangeField, RankNumeral, ReactionButton, Readout, RequirementList, ResizableGroup, ResizablePanel, ResizableSeparator, Reveal, ScrollArea, ScrollBar, ScrollableSections, SearchBox, SectionCard, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCardList, Separator, ShareMenu, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShimmeringText, ShowcaseCard, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, Sidebar$1 as SidebarPrimitive, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleCard, SimpleClickableCard, SimpleInfoCard, SimpleList, SimplePaginatedList, SimplifiedDate, Skeleton, SortMenu, Spinner, StatCard, StatusBadge, StatusCardList, StepTabs, StyleScope, Switch, TYPOGRAPHY_VARIANTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsContents, TabsList, TabsTrigger, Tag, TagInput, Textarea, ThumbnailStrip, TimePicker, Timeline, Toast, Toaster, TogglableItemsList, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, Tooltip, TooltipContent, TooltipProvider, Tooltip$1 as TooltipRoot, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TransferList, TreemapChart, TruncatedLineWithTooltip, Typography, UserTypeBadge, VARIANTS, VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_DURATION_CLASS, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, VARIANT_GRADIENT_TRANSITION_DURATION_MS, VerificationInProgress, VerticalStepper, ViewToggle, Footer as WorkspaceFooter, Header as WorkspaceHeader, WorkspaceLayout, animatedCardAnimations, animatedCardTypeKeys, arbitraryGradientBackgroundImage, badgeVariants, buildSeriesChartConfig, buttonGroupVariants, buttonVariants, cn, computeDateRange, densityStyle, easeOutSplines, getChartSeriesColor, illustrationRegistry, illustrationsById, isSidebarGroup, keyTimes, listStyleValues, listVariants, parseSvgViewBoxAspectRatio, parseTextMarkup, registerDensity, registerStyleValue, registerVariant, resolveDensity, resolveStyleValue, resolveVariantStyles, settleSheet, statusBadgeSizeVariants, supportsViewTransitions, toast, typographyDefaultElement, typographyVariantClasses, useControlledState, useFiltersCollapsed, useFormField, useIsMobile, usePanelFlag, useSidebar, useStyleAxes, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes };
|
|
@@ -28,7 +28,7 @@ function EntryLayout({ appName, children, backgroundImageUrl, heading, darkMode,
|
|
|
28
28
|
className: "flex-1 flex flex-col items-center justify-center main-content",
|
|
29
29
|
children
|
|
30
30
|
}), !hideFooter && /* @__PURE__ */ jsx("div", {
|
|
31
|
-
className: "shrink-0 text-center
|
|
31
|
+
className: "shrink-0 text-center type-caption text-muted-foreground footer-card-wrapper py-10",
|
|
32
32
|
children: /* @__PURE__ */ jsx(FooterCard, {})
|
|
33
33
|
})] })]
|
|
34
34
|
})
|
package/dist/layouts/index.d.ts
CHANGED
|
@@ -220,7 +220,10 @@ interface MinimalWorkspaceLayoutLabels {
|
|
|
220
220
|
expandSidebar?: string;
|
|
221
221
|
/** Collapse button beside the expanded logo. Default "Collapse sidebar". */
|
|
222
222
|
collapseSidebar?: string;
|
|
223
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* Menu button in the mobile top bar, or `MinimalWorkspaceSidebarTrigger` on
|
|
225
|
+
* mobile with `hideMobileTopBar`. Default "Open menu".
|
|
226
|
+
*/
|
|
224
227
|
openMenu?: string;
|
|
225
228
|
/**
|
|
226
229
|
* `MinimalWorkspaceSidebarTrigger` while a `hideWhenCollapsed` sidebar is
|
|
@@ -248,10 +251,20 @@ interface MinimalWorkspaceLayoutProps extends Omit<WorkspaceLayoutProps, "sideba
|
|
|
248
251
|
headerConfig?: WorkspaceHeaderConfig;
|
|
249
252
|
/**
|
|
250
253
|
* Floats over the main content at its top-right corner (desktop); sits at the
|
|
251
|
-
* end of the top bar on mobile
|
|
252
|
-
* itself, not on the space
|
|
254
|
+
* end of the top bar on mobile, or floats there too with `hideMobileTopBar`.
|
|
255
|
+
* Any node. It catches pointer events only on itself, not on the space
|
|
256
|
+
* around it.
|
|
253
257
|
*/
|
|
254
258
|
topRightContent?: ReactNode;
|
|
259
|
+
/**
|
|
260
|
+
* On mobile, draw no top bar (menu button, mobile logo, `topRightContent`)
|
|
261
|
+
* above the content: for a page that has a toolbar of its own, so a phone
|
|
262
|
+
* does not show two bars. The page then carries the way into the
|
|
263
|
+
* navigation: a `MinimalWorkspaceSidebarTrigger` in its toolbar becomes the
|
|
264
|
+
* menu button on mobile (opens the menu sheet, `labels.openMenu`).
|
|
265
|
+
* `topRightContent` floats over the content as on desktop. Default false.
|
|
266
|
+
*/
|
|
267
|
+
hideMobileTopBar?: boolean;
|
|
255
268
|
/**
|
|
256
269
|
* Whether the sidebar starts expanded when uncontrolled. **Defaults to
|
|
257
270
|
* `false`** (WorkspaceLayout's defaults to `true`).
|
|
@@ -274,9 +287,11 @@ type MinimalWorkspaceSidebarTriggerProps = Omit<ComponentProps<typeof Button>, "
|
|
|
274
287
|
/**
|
|
275
288
|
* A button that opens the sidebar inline and closes it again: the app's own
|
|
276
289
|
* handle on a `hideWhenCollapsed` sidebar, usually placed in `topRightContent`
|
|
277
|
-
* (it also expands and collapses the icon rail).
|
|
278
|
-
* `MinimalWorkspaceLayout`.
|
|
279
|
-
*
|
|
290
|
+
* or the page's own toolbar (it also expands and collapses the icon rail).
|
|
291
|
+
* Must render inside `MinimalWorkspaceLayout`. On desktop it renders nothing
|
|
292
|
+
* when the sidebar is not `expandable`. On mobile it renders nothing while the
|
|
293
|
+
* layout's top bar carries the menu button; with `hideMobileTopBar` it is that
|
|
294
|
+
* menu button, opening the menu sheet.
|
|
280
295
|
*/
|
|
281
296
|
declare function MinimalWorkspaceSidebarTrigger({ className, ...props }: MinimalWorkspaceSidebarTriggerProps): React.JSX.Element | null;
|
|
282
297
|
|
package/dist/layouts/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import Header from "./workspace-layout/header/header.js";
|
|
|
3
3
|
import Footer from "./workspace-layout/footer/footer.js";
|
|
4
4
|
import AccountMenu from "./workspace-layout/account-menu/account-menu.js";
|
|
5
5
|
import WorkspaceLayout from "./workspace-layout/workspace-layout.js";
|
|
6
|
-
import MinimalWorkspaceLayout from "./minimal-workspace-layout/minimal-workspace-layout.js";
|
|
7
6
|
import { MinimalWorkspaceSidebarTrigger } from "./minimal-workspace-layout/sidebar-trigger.js";
|
|
7
|
+
import MinimalWorkspaceLayout from "./minimal-workspace-layout/minimal-workspace-layout.js";
|
|
8
8
|
import EntryLayout from "./entry-layout/entry-layout.js";
|
|
9
9
|
export { AccountMenu, EntryLayout, MinimalWorkspaceLayout, MinimalWorkspaceSidebarTrigger, Footer as WorkspaceFooter, Header as WorkspaceHeader, WorkspaceLayout, isSidebarGroup };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
-
import { Button } from "../../components/button/button.js";
|
|
3
2
|
import { SidebarInset, SidebarProvider, useSidebar } from "../../core/animate-ui/components/radix/sidebar.js";
|
|
4
3
|
import Sidebar from "../../components/sidebar/sidebar.js";
|
|
5
4
|
import AccountMenu from "../workspace-layout/account-menu/account-menu.js";
|
|
@@ -8,9 +7,9 @@ import { resolveFooterBranding } from "../shared/footer-branding.js";
|
|
|
8
7
|
import { accountMenuProps } from "../shared/account-menu-props.js";
|
|
9
8
|
import { RailLogo } from "./rail-logo.js";
|
|
10
9
|
import { MinimalWorkspaceLayoutContextProvider } from "./minimal-workspace-layout-context.js";
|
|
10
|
+
import { MobileMenuButton } from "./sidebar-trigger.js";
|
|
11
11
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Menu } from "lucide-react";
|
|
14
13
|
//#region src/layouts/minimal-workspace-layout/minimal-workspace-layout.tsx
|
|
15
14
|
var LOGO_HEIGHT = "var(--espd-minimal-workspace-layout-logo-height,3.5rem)";
|
|
16
15
|
/**
|
|
@@ -91,7 +90,7 @@ var hiddenGapClass = "data-[sidebar-mode=peek]:[&_[data-slot=sidebar-gap]]:w-0 d
|
|
|
91
90
|
* Mouse-only by design (the trigger and ⌘/Ctrl+B serve the keyboard).
|
|
92
91
|
*/
|
|
93
92
|
var edgeClass = cn("absolute inset-y-0 left-0 z-10 w-[var(--espd-minimal-workspace-layout-edge-hit-width,12px)] cursor-e-resize select-none", "before:absolute before:inset-y-0 before:left-0 before:w-[var(--espd-minimal-workspace-layout-edge-width,3px)] before:bg-[var(--espd-minimal-workspace-layout-edge-color,var(--color-primary))]", "before:opacity-0 before:transition-opacity before:duration-[var(--espd-duration-fast,150ms)] motion-reduce:before:transition-none hover:before:opacity-100");
|
|
94
|
-
function MinimalWorkspaceShell({ appName, logo, logoCollapsed, logoMobile, logoAssets, footerBranding, children, sidebarConfig, headerConfig, topRightContent, labels, onLogoutClick, onProfileCardClick, onColorThemeChange, colorTheme, onLanguageChange, languages, currentLanguage, accountMenuItems, hiddenSidebar }) {
|
|
93
|
+
function MinimalWorkspaceShell({ appName, logo, logoCollapsed, logoMobile, logoAssets, footerBranding, children, sidebarConfig, headerConfig, topRightContent, hideMobileTopBar = false, labels, onLogoutClick, onProfileCardClick, onColorThemeChange, colorTheme, onLanguageChange, languages, currentLanguage, accountMenuItems, hiddenSidebar }) {
|
|
95
94
|
const { state, isMobile, setOpen } = useSidebar();
|
|
96
95
|
const sidebarId = useId();
|
|
97
96
|
const expandable = sidebarConfig.expandable ?? true;
|
|
@@ -100,6 +99,8 @@ function MinimalWorkspaceShell({ appName, logo, logoCollapsed, logoMobile, logoA
|
|
|
100
99
|
const darkMode = colorTheme === "dark";
|
|
101
100
|
const LinkComponent = sidebarConfig.linkComponent;
|
|
102
101
|
const topRight = topRightContent ?? headerConfig?.rightContent;
|
|
102
|
+
const mobileTopBar = isMobile && !hideMobileTopBar;
|
|
103
|
+
const menuLabel = labels?.openMenu ?? "Open menu";
|
|
103
104
|
const showLabel = hide ? labels?.showSidebar ?? "Show sidebar" : labels?.expandSidebar ?? "Expand sidebar";
|
|
104
105
|
const hideLabel = hide ? labels?.hideSidebar ?? "Hide sidebar" : labels?.collapseSidebar ?? "Collapse sidebar";
|
|
105
106
|
const [triggers, setTriggers] = useState(0);
|
|
@@ -239,6 +240,8 @@ function MinimalWorkspaceShell({ appName, logo, logoCollapsed, logoMobile, logoA
|
|
|
239
240
|
hidden: hide,
|
|
240
241
|
showLabel,
|
|
241
242
|
hideLabel,
|
|
243
|
+
mobileTopBar: !hideMobileTopBar,
|
|
244
|
+
menuLabel,
|
|
242
245
|
registerTrigger
|
|
243
246
|
},
|
|
244
247
|
children: [/* @__PURE__ */ jsx(Sidebar, {
|
|
@@ -276,10 +279,11 @@ function MinimalWorkspaceShell({ appName, logo, logoCollapsed, logoMobile, logoA
|
|
|
276
279
|
}), /* @__PURE__ */ jsxs(SidebarInset, {
|
|
277
280
|
"data-slot": "minimal-workspace-layout-main",
|
|
278
281
|
className: "h-[var(--espd-minimal-workspace-layout-height,100dvh)] max-h-[var(--espd-minimal-workspace-layout-height,100dvh)] overflow-hidden bg-[var(--espd-minimal-workspace-layout-content-background,var(--color-background))]",
|
|
279
|
-
children: [
|
|
282
|
+
children: [mobileTopBar && /* @__PURE__ */ jsxs("div", {
|
|
283
|
+
"data-slot": "minimal-workspace-layout-mobile-bar",
|
|
280
284
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-[color:color-mix(in_oklab,var(--espd-minimal-workspace-layout-content-background,var(--color-background))_90%,var(--color-foreground))] px-2",
|
|
281
285
|
children: [
|
|
282
|
-
/* @__PURE__ */ jsx(MobileMenuButton, { label:
|
|
286
|
+
/* @__PURE__ */ jsx(MobileMenuButton, { label: menuLabel }),
|
|
283
287
|
mobileLogo({
|
|
284
288
|
logoMobile,
|
|
285
289
|
logoAssets,
|
|
@@ -309,7 +313,7 @@ function MinimalWorkspaceShell({ appName, logo, logoCollapsed, logoMobile, logoA
|
|
|
309
313
|
onPointerEnter: onEdgePointerEnter,
|
|
310
314
|
onPointerLeave: cancelHoverPeek
|
|
311
315
|
}),
|
|
312
|
-
!
|
|
316
|
+
!mobileTopBar && topRight != null && /* @__PURE__ */ jsx("div", {
|
|
313
317
|
"data-slot": "minimal-workspace-layout-top-right",
|
|
314
318
|
className: "pointer-events-none absolute top-[var(--espd-minimal-workspace-layout-top-right-offset-y,0.75rem)] right-[var(--espd-minimal-workspace-layout-top-right-offset-x,1rem)] z-20 flex",
|
|
315
319
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -322,18 +326,6 @@ function MinimalWorkspaceShell({ appName, logo, logoCollapsed, logoMobile, logoA
|
|
|
322
326
|
})]
|
|
323
327
|
});
|
|
324
328
|
}
|
|
325
|
-
function MobileMenuButton({ label }) {
|
|
326
|
-
const { setOpenMobile } = useSidebar();
|
|
327
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
328
|
-
variant: "ghost",
|
|
329
|
-
size: "icon",
|
|
330
|
-
hideRingOnHover: true,
|
|
331
|
-
"aria-label": label,
|
|
332
|
-
className: "size-9 shrink-0",
|
|
333
|
-
onClick: () => setOpenMobile(true),
|
|
334
|
-
children: /* @__PURE__ */ jsx(Menu, { className: "size-5" })
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
329
|
/**
|
|
338
330
|
* Header-less app shell: an icon rail that expands into a labelled sidebar
|
|
339
331
|
* (or, with `sidebarConfig.hideWhenCollapsed`, a hidden sidebar that peeks
|