asterui 0.12.64 → 0.12.66
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/AspectRatio.d.ts +9 -0
- package/dist/components/AspectRatio.js +14 -0
- package/dist/components/AspectRatio.js.map +1 -0
- package/dist/components/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker.js +445 -302
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/Image.js +85 -77
- package/dist/components/Image.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +261 -259
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AspectRatioProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Aspect ratio as width / height */
|
|
4
|
+
ratio?: number;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** Test ID for testing */
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
const p = n(function({ ratio: t = 1, children: e, className: o = "", style: s, ...a }, i) {
|
|
4
|
+
const r = ["relative w-full", o].filter(Boolean).join(" "), c = {
|
|
5
|
+
...s,
|
|
6
|
+
aspectRatio: t
|
|
7
|
+
};
|
|
8
|
+
return /* @__PURE__ */ l("div", { ref: i, className: r, style: c, ...a, children: e });
|
|
9
|
+
});
|
|
10
|
+
p.displayName = "AspectRatio";
|
|
11
|
+
export {
|
|
12
|
+
p as AspectRatio
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=AspectRatio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AspectRatio.js","sources":["../../src/components/AspectRatio.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nexport interface AspectRatioProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Aspect ratio as width / height */\n ratio?: number\n children?: React.ReactNode\n /** Test ID for testing */\n 'data-testid'?: string\n}\n\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { ratio = 1, children, className = '', style, ...rest },\n ref\n) {\n const classes = ['relative w-full', className]\n .filter(Boolean)\n .join(' ')\n const mergedStyle: React.CSSProperties = {\n ...style,\n aspectRatio: ratio,\n }\n\n return (\n <div ref={ref} className={classes} style={mergedStyle} {...rest}>\n {children}\n </div>\n )\n})\n\nAspectRatio.displayName = 'AspectRatio'\n"],"names":["AspectRatio","forwardRef","ratio","children","className","style","rest","ref","classes","mergedStyle","jsx"],"mappings":";;AAUO,MAAMA,IAAcC,EAA6C,SACtE,EAAE,OAAAC,IAAQ,GAAG,UAAAC,GAAU,WAAAC,IAAY,IAAI,OAAAC,GAAO,GAAGC,EAAA,GACjDC,GACA;AACA,QAAMC,IAAU,CAAC,mBAAmBJ,CAAS,EAC1C,OAAO,OAAO,EACd,KAAK,GAAG,GACLK,IAAmC;AAAA,IACvC,GAAGJ;AAAA,IACH,aAAaH;AAAA,EAAA;AAGf,SACE,gBAAAQ,EAAC,SAAI,KAAAH,GAAU,WAAWC,GAAS,OAAOC,GAAc,GAAGH,GACxD,UAAAH,EAAA,CACH;AAEJ,CAAC;AAEDH,EAAY,cAAc;"}
|
|
@@ -5,6 +5,7 @@ export interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
5
5
|
onChange?: (date: Date | null) => void;
|
|
6
6
|
format?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
|
+
disabledDate?: (date: Date) => boolean;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
10
11
|
/** Test ID prefix for child elements */
|
|
@@ -17,6 +18,7 @@ export interface DateRangePickerProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
17
18
|
onChange?: (range: DateRangeValue) => void;
|
|
18
19
|
format?: string;
|
|
19
20
|
placeholder?: [string, string] | string;
|
|
21
|
+
disabledDate?: (date: Date) => boolean;
|
|
20
22
|
disabled?: boolean;
|
|
21
23
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
22
24
|
/** Test ID prefix for child elements */
|