@dynamic-labs-sdk/droplet 1.44.0 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/page-header/index.d.ts +3 -0
- package/dist/components/page-header/index.d.ts.map +1 -0
- package/dist/components/page-header/page-header.d.ts +45 -0
- package/dist/components/page-header/page-header.d.ts.map +1 -0
- package/dist/components/page-header/page-header.stories.d.ts +15 -0
- package/dist/components/page-header/page-header.stories.d.ts.map +1 -0
- package/dist/components/product-page-layout/product-page-layout.d.ts.map +1 -1
- package/dist/index.cjs +46 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +46 -13
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link PageHeader}.
|
|
4
|
+
*
|
|
5
|
+
* @description `title` is the page heading; `description` renders muted
|
|
6
|
+
* supporting text under it; `badge` sits next to the title; `actions` render
|
|
7
|
+
* right-aligned; `className` merges onto the outer wrapper.
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const props: PageHeaderProps = {
|
|
11
|
+
* title: 'Accounts',
|
|
12
|
+
* description: 'Manage your accounts',
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
15
|
+
* @see PageHeader
|
|
16
|
+
* @see ProductPageLayout
|
|
17
|
+
*/
|
|
18
|
+
export type PageHeaderProps = {
|
|
19
|
+
actions?: ReactNode;
|
|
20
|
+
badge?: ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
title: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Standard page heading — title, optional muted description, optional badge
|
|
27
|
+
* next to the title and optional actions on the right. `ProductPageLayout`
|
|
28
|
+
* renders the same header internally; use this on pages outside it so every
|
|
29
|
+
* page shares one header pattern.
|
|
30
|
+
*
|
|
31
|
+
* @description Renders the shared dashboard page header pattern.
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <PageHeader
|
|
35
|
+
* title="Accounts"
|
|
36
|
+
* description="Manage your accounts"
|
|
37
|
+
* actions={<Button>New account</Button>}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
* @returns The rendered page header element.
|
|
41
|
+
* @see ProductPageLayout
|
|
42
|
+
* @see SettingsSection
|
|
43
|
+
*/
|
|
44
|
+
export declare const PageHeader: ({ title, description, badge, actions, className, }: PageHeaderProps) => ReactElement;
|
|
45
|
+
//# sourceMappingURL=page-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI1D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,uDAMpB,eAAe,KAAG,YAqBpB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
args: {
|
|
4
|
+
description: string;
|
|
5
|
+
title: string;
|
|
6
|
+
};
|
|
7
|
+
component: ({ title, description, badge, actions, className, }: import("./page-header").PageHeaderProps) => import("react").ReactElement;
|
|
8
|
+
tags: string[];
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithBadgeAndActions: Story;
|
|
15
|
+
//# sourceMappingURL=page-header.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.stories.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,QAAA,MAAM,IAAI;;;;;;;;CAQyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,mBAAmB,EAAE,KAKjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-page-layout.d.ts","sourceRoot":"","sources":["../../../src/components/product-page-layout/product-page-layout.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"product-page-layout.d.ts","sourceRoot":"","sources":["../../../src/components/product-page-layout/product-page-layout.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ1D,UAAU,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,oGAS3B,sBAAsB,KAAG,YAmD3B,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -3101,6 +3101,47 @@ const WebhooksAction = () => {
|
|
|
3101
3101
|
});
|
|
3102
3102
|
};
|
|
3103
3103
|
|
|
3104
|
+
//#endregion
|
|
3105
|
+
//#region src/components/page-header/page-header.tsx
|
|
3106
|
+
/**
|
|
3107
|
+
* Standard page heading — title, optional muted description, optional badge
|
|
3108
|
+
* next to the title and optional actions on the right. `ProductPageLayout`
|
|
3109
|
+
* renders the same header internally; use this on pages outside it so every
|
|
3110
|
+
* page shares one header pattern.
|
|
3111
|
+
*
|
|
3112
|
+
* @description Renders the shared dashboard page header pattern.
|
|
3113
|
+
* @example
|
|
3114
|
+
* ```tsx
|
|
3115
|
+
* <PageHeader
|
|
3116
|
+
* title="Accounts"
|
|
3117
|
+
* description="Manage your accounts"
|
|
3118
|
+
* actions={<Button>New account</Button>}
|
|
3119
|
+
* />
|
|
3120
|
+
* ```
|
|
3121
|
+
* @returns The rendered page header element.
|
|
3122
|
+
* @see ProductPageLayout
|
|
3123
|
+
* @see SettingsSection
|
|
3124
|
+
*/
|
|
3125
|
+
const PageHeader = ({ title, description, badge, actions, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3126
|
+
className: require_toggle_row.cn("flex items-start justify-between gap-4", className),
|
|
3127
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [badge ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3128
|
+
className: "flex flex-wrap items-center gap-2",
|
|
3129
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
|
|
3130
|
+
className: "text-2xl font-semibold text-balance",
|
|
3131
|
+
children: title
|
|
3132
|
+
}), badge]
|
|
3133
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
|
|
3134
|
+
className: "text-2xl font-semibold text-balance",
|
|
3135
|
+
children: title
|
|
3136
|
+
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3137
|
+
className: "text-sm text-muted-foreground mt-1 text-pretty",
|
|
3138
|
+
children: description
|
|
3139
|
+
})] }), actions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3140
|
+
className: "flex items-center gap-2 shrink-0",
|
|
3141
|
+
children: actions
|
|
3142
|
+
})]
|
|
3143
|
+
});
|
|
3144
|
+
|
|
3104
3145
|
//#endregion
|
|
3105
3146
|
//#region src/components/product-page-layout/product-page-layout.tsx
|
|
3106
3147
|
const spring = {
|
|
@@ -3139,18 +3180,10 @@ const ProductPageLayout = ({ title, tabs, activeTab, onTabChange, children, head
|
|
|
3139
3180
|
className: "flex-1 overflow-auto",
|
|
3140
3181
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3141
3182
|
className: "px-10 py-8 space-y-8",
|
|
3142
|
-
children: [headerContent ?? /* @__PURE__ */ (0, react_jsx_runtime.
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
children: activeTabConfig?.heading ?? activeTabConfig?.label ?? activeTab
|
|
3147
|
-
}), activeTabConfig?.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3148
|
-
className: "text-sm text-muted-foreground mt-1 text-pretty",
|
|
3149
|
-
children: activeTabConfig.description
|
|
3150
|
-
})] }), headerActions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3151
|
-
className: "flex items-center gap-2 shrink-0",
|
|
3152
|
-
children: headerActions
|
|
3153
|
-
})]
|
|
3183
|
+
children: [headerContent ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, {
|
|
3184
|
+
title: activeTabConfig?.heading ?? activeTabConfig?.label ?? activeTab,
|
|
3185
|
+
description: activeTabConfig?.description,
|
|
3186
|
+
actions: headerActions
|
|
3154
3187
|
}), children]
|
|
3155
3188
|
})
|
|
3156
3189
|
})]
|
|
@@ -5108,6 +5141,7 @@ exports.LinkIcon = LinkIcon;
|
|
|
5108
5141
|
exports.MetricCard = MetricCard;
|
|
5109
5142
|
exports.MoonIcon = MoonIcon;
|
|
5110
5143
|
exports.OpenAILogo = OpenAILogo;
|
|
5144
|
+
exports.PageHeader = PageHeader;
|
|
5111
5145
|
exports.PageSkeleton = PageSkeleton;
|
|
5112
5146
|
exports.Pagination = Pagination;
|
|
5113
5147
|
exports.PaginationContent = PaginationContent;
|