@moving-walls/design-system 1.0.16 → 1.0.18
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/DatePicker.d.ts +2 -1
- package/dist/components/ui/DateRangePicker.d.ts +2 -1
- package/dist/components/ui/PageHeader.d.ts +1 -1
- package/dist/index.esm.js +9 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +141 -141
|
@@ -8,5 +8,6 @@ export interface DatePickerProps {
|
|
|
8
8
|
error?: string;
|
|
9
9
|
minDate?: Date;
|
|
10
10
|
maxDate?: Date;
|
|
11
|
+
align?: 'left' | 'right';
|
|
11
12
|
}
|
|
12
|
-
export declare function DatePicker({ value, onChange, placeholder, disabled, className, label, error, minDate, maxDate }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function DatePicker({ value, onChange, placeholder, disabled, className, label, error, minDate, maxDate, align }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,6 +19,7 @@ interface DateRangePickerProps {
|
|
|
19
19
|
label: string;
|
|
20
20
|
range: DateRange;
|
|
21
21
|
}>;
|
|
22
|
+
align?: 'left' | 'right';
|
|
22
23
|
}
|
|
23
|
-
export declare function DateRangePicker({ value, onChange, placeholder, disabled, required, clearable, minDate, maxDate, numberOfMonths, className, format, presets }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function DateRangePicker({ value, onChange, placeholder, disabled, required, clearable, minDate, maxDate, numberOfMonths, className, format, presets, align }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
export default DateRangePicker;
|
|
@@ -4,7 +4,7 @@ export interface PageHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
/** Description shown below the title */
|
|
5
5
|
description?: string;
|
|
6
6
|
/** Alias for description (backward compat) */
|
|
7
|
-
subtitle?:
|
|
7
|
+
subtitle?: React.ReactNode;
|
|
8
8
|
/** i18n key for the title (consumer passes pre-translated string as title) */
|
|
9
9
|
titleKey?: string;
|
|
10
10
|
/** i18n key for the description */
|
package/dist/index.esm.js
CHANGED
|
@@ -36132,7 +36132,9 @@ function DatePicker(_ref) {
|
|
|
36132
36132
|
label = _ref.label,
|
|
36133
36133
|
error = _ref.error,
|
|
36134
36134
|
minDate = _ref.minDate,
|
|
36135
|
-
maxDate = _ref.maxDate
|
|
36135
|
+
maxDate = _ref.maxDate,
|
|
36136
|
+
_ref$align = _ref.align,
|
|
36137
|
+
align = _ref$align === void 0 ? 'left' : _ref$align;
|
|
36136
36138
|
var _useState = useState(false),
|
|
36137
36139
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36138
36140
|
isOpen = _useState2[0],
|
|
@@ -36211,7 +36213,7 @@ function DatePicker(_ref) {
|
|
|
36211
36213
|
className: "mt-1 text-sm text-mw-error-600 dark:text-mw-error-400",
|
|
36212
36214
|
children: error
|
|
36213
36215
|
}), isOpen && jsxs("div", {
|
|
36214
|
-
className: "absolute z-50 mt-1 bg-white dark:bg-mw-neutral-800 border border-mw-neutral-200 dark:border-mw-neutral-700 rounded-md shadow-lg p-4 min-w-[280px]",
|
|
36216
|
+
className: clsx("absolute z-50 mt-1 bg-white dark:bg-mw-neutral-800 border border-mw-neutral-200 dark:border-mw-neutral-700 rounded-md shadow-lg p-4 min-w-[280px]", align === 'right' ? 'right-0' : 'left-0'),
|
|
36215
36217
|
children: [jsxs("div", {
|
|
36216
36218
|
className: "flex items-center justify-between mb-4",
|
|
36217
36219
|
children: [jsx(Button, {
|
|
@@ -36468,7 +36470,9 @@ function DateRangePicker(_ref3) {
|
|
|
36468
36470
|
_ref3$format = _ref3.format,
|
|
36469
36471
|
format = _ref3$format === void 0 ? 'MM/dd/yyyy' : _ref3$format,
|
|
36470
36472
|
_ref3$presets = _ref3.presets,
|
|
36471
|
-
presets = _ref3$presets === void 0 ? defaultPresets$1 : _ref3$presets
|
|
36473
|
+
presets = _ref3$presets === void 0 ? defaultPresets$1 : _ref3$presets,
|
|
36474
|
+
_ref3$align = _ref3.align,
|
|
36475
|
+
align = _ref3$align === void 0 ? 'left' : _ref3$align;
|
|
36472
36476
|
var _useState = useState(false),
|
|
36473
36477
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36474
36478
|
isOpen = _useState2[0],
|
|
@@ -36586,7 +36590,7 @@ function DateRangePicker(_ref3) {
|
|
|
36586
36590
|
})]
|
|
36587
36591
|
})]
|
|
36588
36592
|
}), isOpen && jsxs("div", {
|
|
36589
|
-
className: "absolute z-50 mt-1 bg-white dark:bg-mw-neutral-800 border border-mw-neutral-200 dark:border-mw-neutral-700 rounded-lg shadow-lg",
|
|
36593
|
+
className: cn$p("absolute z-50 mt-1 bg-white dark:bg-mw-neutral-800 border border-mw-neutral-200 dark:border-mw-neutral-700 rounded-lg shadow-lg", align === 'right' ? 'right-0' : 'left-0'),
|
|
36590
36594
|
children: [jsxs("div", {
|
|
36591
36595
|
className: "flex",
|
|
36592
36596
|
children: [presets.length > 0 && jsxs("div", {
|
|
@@ -45878,7 +45882,7 @@ function SheetHeader(_a) {
|
|
|
45878
45882
|
className = _a.className,
|
|
45879
45883
|
props = __rest$1(_a, ["children", "className"]);
|
|
45880
45884
|
return jsx("div", Object.assign({
|
|
45881
|
-
className: clsx("flex
|
|
45885
|
+
className: clsx("flex flex-col gap-1 px-6 pr-14 py-4 border-b border-mw-neutral-200 dark:border-mw-neutral-700", className)
|
|
45882
45886
|
}, props, {
|
|
45883
45887
|
children: children
|
|
45884
45888
|
}));
|