@moving-walls/design-system 1.0.11 → 1.0.13
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/ui/PageHeader.d.ts +11 -1
- package/dist/index.esm.js +49 -21
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +49 -21
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface PageHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
title: string;
|
|
4
|
+
/** Description shown below the title */
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Alias for description (backward compat) */
|
|
4
7
|
subtitle?: string;
|
|
8
|
+
/** i18n key for the title (consumer passes pre-translated string as title) */
|
|
9
|
+
titleKey?: string;
|
|
10
|
+
/** i18n key for the description */
|
|
11
|
+
descriptionKey?: string;
|
|
12
|
+
/** Element rendered to the left of the title (e.g. a back button) */
|
|
13
|
+
leftAction?: React.ReactNode;
|
|
14
|
+
/** Action buttons rendered on the right side */
|
|
5
15
|
actions?: React.ReactNode;
|
|
6
16
|
}
|
|
7
|
-
export declare function PageHeader({ title, subtitle, actions, className, ...props }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function PageHeader({ title, description, subtitle, titleKey: _titleKey, descriptionKey: _descriptionKey, leftAction, actions, className, ...props }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
18
|
export declare namespace PageHeader {
|
|
9
19
|
var displayName: string;
|
|
10
20
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -30819,8 +30819,8 @@ var Switch = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
30819
30819
|
className: "flex items-center justify-between",
|
|
30820
30820
|
children: [jsxs("div", {
|
|
30821
30821
|
className: "flex items-center space-x-3",
|
|
30822
|
-
children: [jsxs("
|
|
30823
|
-
className: "relative inline-flex items-center",
|
|
30822
|
+
children: [jsxs("label", {
|
|
30823
|
+
className: "relative inline-flex items-center cursor-pointer",
|
|
30824
30824
|
children: [jsx("input", Object.assign({
|
|
30825
30825
|
type: "checkbox",
|
|
30826
30826
|
ref: ref,
|
|
@@ -30829,12 +30829,16 @@ var Switch = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
30829
30829
|
onChange: handleChange,
|
|
30830
30830
|
disabled: loading || props.disabled
|
|
30831
30831
|
}, props)), jsxs("div", {
|
|
30832
|
-
className: clsx('relative rounded-full
|
|
30832
|
+
className: clsx('relative rounded-full', animate ? 'transition-colors duration-200' : '', 'peer-focus:ring-2 peer-focus:ring-offset-2', variantConfig.focus, loading || props.disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer', error ? 'bg-mw-error-200 peer-checked:bg-mw-error-600' : checked ? variantConfig.on : variantConfig.off, sizeConfig.track, className),
|
|
30833
30833
|
children: [trackIcon && jsx("div", {
|
|
30834
30834
|
className: "absolute inset-0 flex items-center justify-center",
|
|
30835
30835
|
children: trackIcon
|
|
30836
30836
|
}), jsx("div", {
|
|
30837
|
-
className: clsx('absolute
|
|
30837
|
+
className: clsx('absolute top-0.5 rounded-full flex items-center justify-center', animate ? 'transition-transform duration-200' : '', variantConfig.thumb, sizeConfig.thumb, loading && 'shadow-sm'),
|
|
30838
|
+
style: {
|
|
30839
|
+
left: checked ? undefined : '2px',
|
|
30840
|
+
right: checked ? '2px' : undefined
|
|
30841
|
+
},
|
|
30838
30842
|
children: renderThumbContent()
|
|
30839
30843
|
})]
|
|
30840
30844
|
})]
|
|
@@ -35727,7 +35731,7 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
35727
35731
|
return jsx(Portal, {
|
|
35728
35732
|
children: jsxs(Content2, Object.assign({
|
|
35729
35733
|
ref: ref,
|
|
35730
|
-
className: clsx('relative z-
|
|
35734
|
+
className: clsx('relative z-[100001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-mw-neutral-200 dark:border-mw-neutral-700', 'bg-white dark:bg-mw-neutral-800 text-mw-neutral-900 dark:text-mw-neutral-100', 'shadow-lg', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', position === 'popper' && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className),
|
|
35731
35735
|
position: position
|
|
35732
35736
|
}, props, {
|
|
35733
35737
|
children: [jsx(SelectScrollUpButton, {}), jsx(Viewport, {
|
|
@@ -49183,28 +49187,52 @@ var AgGridTable = AgGridTableInner;
|
|
|
49183
49187
|
|
|
49184
49188
|
function PageHeader(_a) {
|
|
49185
49189
|
var title = _a.title,
|
|
49186
|
-
|
|
49190
|
+
description = _a.description,
|
|
49191
|
+
subtitle = _a.subtitle;
|
|
49192
|
+
_a.titleKey;
|
|
49193
|
+
_a.descriptionKey;
|
|
49194
|
+
var leftAction = _a.leftAction,
|
|
49187
49195
|
actions = _a.actions,
|
|
49188
49196
|
className = _a.className,
|
|
49189
|
-
props = __rest$1(_a, ["title", "subtitle", "actions", "className"]);
|
|
49197
|
+
props = __rest$1(_a, ["title", "description", "subtitle", "titleKey", "descriptionKey", "leftAction", "actions", "className"]);
|
|
49198
|
+
var desc = description !== null && description !== void 0 ? description : subtitle;
|
|
49199
|
+
var headerId = "page-header-".concat(title.toLowerCase().trim().split(/\s+/).join('-'));
|
|
49200
|
+
var baseClass = 'bg-white flex flex-col justify-start items-start gap-4 border-b border-t border-container-border pt-4 pb-3 dark:bg-mw-neutral-900 dark:border-mw-neutral-800';
|
|
49201
|
+
var combinedClass = className ? "".concat(baseClass, " ").concat(className) : baseClass;
|
|
49190
49202
|
return jsx("div", Object.assign({
|
|
49191
|
-
|
|
49203
|
+
id: headerId,
|
|
49204
|
+
className: combinedClass
|
|
49192
49205
|
}, props, {
|
|
49193
49206
|
children: jsxs("div", {
|
|
49194
|
-
className: "
|
|
49207
|
+
className: "self-stretch px-4 inline-flex justify-start items-start",
|
|
49195
49208
|
children: [jsxs("div", {
|
|
49196
|
-
className: "
|
|
49197
|
-
children: [jsx("
|
|
49198
|
-
|
|
49199
|
-
|
|
49200
|
-
|
|
49201
|
-
|
|
49202
|
-
|
|
49203
|
-
|
|
49204
|
-
})
|
|
49205
|
-
|
|
49206
|
-
|
|
49207
|
-
|
|
49209
|
+
className: "pt-2 flex justify-start items-start gap-2",
|
|
49210
|
+
children: [leftAction && jsx("div", {
|
|
49211
|
+
id: "".concat(headerId, "-left-action"),
|
|
49212
|
+
className: "p-2 flex justify-center items-center gap-1",
|
|
49213
|
+
children: jsx("div", {
|
|
49214
|
+
className: "relative overflow-hidden",
|
|
49215
|
+
children: leftAction
|
|
49216
|
+
})
|
|
49217
|
+
}), jsxs("div", {
|
|
49218
|
+
className: "self-stretch inline-flex flex-col justify-start items-start gap-1",
|
|
49219
|
+
children: [jsx("div", {
|
|
49220
|
+
id: "".concat(headerId, "-title"),
|
|
49221
|
+
className: "self-stretch justify-start text-xl font-semibold leading-loose text-mw-neutral-900 dark:text-white",
|
|
49222
|
+
children: title
|
|
49223
|
+
}), desc && jsx("div", {
|
|
49224
|
+
id: "".concat(headerId, "-description"),
|
|
49225
|
+
className: "self-stretch justify-start text-neutral-500 text-sm font-normal leading-none dark:text-mw-neutral-400",
|
|
49226
|
+
children: desc
|
|
49227
|
+
})]
|
|
49228
|
+
})]
|
|
49229
|
+
}), jsx("div", {
|
|
49230
|
+
id: "".concat(headerId, "-actions"),
|
|
49231
|
+
className: "flex-1 self-stretch flex justify-end items-end gap-2",
|
|
49232
|
+
children: actions && jsx("div", {
|
|
49233
|
+
className: "flex items-center gap-4",
|
|
49234
|
+
children: actions
|
|
49235
|
+
})
|
|
49208
49236
|
})]
|
|
49209
49237
|
})
|
|
49210
49238
|
}));
|