@rockshin/tao-ui 0.0.41 → 0.0.42
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/README.md +33 -7
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/component-manifest.json +1321 -10
- package/dist/components/affix/affix.css +11 -0
- package/dist/components/affix/affix.d.ts +21 -0
- package/dist/components/affix/affix.js +140 -0
- package/dist/components/app/app-modals.d.ts +2 -0
- package/dist/components/app/app-modals.js +266 -0
- package/dist/components/app/app-notices.d.ts +6 -0
- package/dist/components/app/app-notices.js +334 -0
- package/dist/components/app/app-types.d.ts +154 -0
- package/dist/components/app/app-types.js +0 -0
- package/dist/components/app/app.css +221 -0
- package/dist/components/app/app.d.ts +7 -0
- package/dist/components/app/app.js +69 -0
- package/dist/components/auto-complete/auto-complete.css +35 -0
- package/dist/components/auto-complete/auto-complete.d.ts +47 -0
- package/dist/components/auto-complete/auto-complete.js +106 -0
- package/dist/components/avatar/avatar.css +95 -0
- package/dist/components/avatar/avatar.d.ts +50 -0
- package/dist/components/avatar/avatar.js +159 -0
- package/dist/components/badge/badge.css +165 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.js +412 -0
- package/dist/components/border-beam/border-beam.css +35 -0
- package/dist/components/border-beam/border-beam.d.ts +27 -0
- package/dist/components/border-beam/border-beam.js +215 -0
- package/dist/components/button/button.css +7 -0
- package/dist/components/calendar/calendar.css +176 -0
- package/dist/components/calendar/calendar.d.ts +56 -0
- package/dist/components/calendar/calendar.js +175 -0
- package/dist/components/card/card-tabs.d.ts +43 -0
- package/dist/components/card/card-tabs.js +455 -0
- package/dist/components/card/card.css +401 -0
- package/dist/components/card/card.d.ts +74 -0
- package/dist/components/card/card.js +362 -0
- package/dist/components/carousel/carousel.css +231 -0
- package/dist/components/carousel/carousel.d.ts +35 -0
- package/dist/components/carousel/carousel.js +193 -0
- package/dist/components/cascader/cascader.css +123 -0
- package/dist/components/cascader/cascader.d.ts +58 -0
- package/dist/components/cascader/cascader.js +132 -0
- package/dist/components/checkbox/checkbox.css +7 -0
- package/dist/components/color-picker/color-picker-types.d.ts +78 -0
- package/dist/components/color-picker/color-picker-types.js +0 -0
- package/dist/components/color-picker/color-picker.css +299 -0
- package/dist/components/color-picker/color-picker.d.ts +5 -0
- package/dist/components/color-picker/color-picker.js +974 -0
- package/dist/components/color-picker/color.d.ts +35 -0
- package/dist/components/color-picker/color.js +65 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +4 -11
- package/dist/components/date-picker/calendar/calendar-header.js +76 -69
- package/dist/components/date-picker/calendar/month-grid.js +20 -31
- package/dist/components/date-picker/calendar/time-panel.js +46 -41
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.js +4 -4
- package/dist/components/date-picker/range-picker.js +14 -13
- package/dist/components/descriptions/descriptions.css +109 -0
- package/dist/components/descriptions/descriptions.d.ts +49 -0
- package/dist/components/descriptions/descriptions.js +189 -0
- package/dist/components/divider/divider.css +71 -0
- package/dist/components/divider/divider.d.ts +31 -0
- package/dist/components/divider/divider.js +83 -0
- package/dist/components/drawer/drawer.js +199 -184
- package/dist/components/empty/empty.css +35 -0
- package/dist/components/empty/empty.d.ts +25 -0
- package/dist/components/empty/empty.js +278 -0
- package/dist/components/float-button/float-button.css +146 -0
- package/dist/components/float-button/float-button.d.ts +67 -0
- package/dist/components/float-button/float-button.js +347 -0
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form.js +3 -1
- package/dist/components/image/image-icons.d.ts +16 -0
- package/dist/components/image/image-icons.js +63 -0
- package/dist/components/image/image.css +253 -0
- package/dist/components/image/image.d.ts +75 -0
- package/dist/components/image/image.js +818 -0
- package/dist/components/input/input.css +8 -6
- package/dist/components/list/list-pagination.css +127 -0
- package/dist/components/list/list-pagination.d.ts +38 -0
- package/dist/components/list/list-pagination.js +321 -0
- package/dist/components/list/list.css +225 -0
- package/dist/components/list/list.d.ts +77 -0
- package/dist/components/list/list.js +660 -0
- package/dist/components/listy/listy.css +55 -0
- package/dist/components/listy/listy.d.ts +20 -0
- package/dist/components/listy/listy.js +158 -0
- package/dist/components/masonry/masonry.css +13 -0
- package/dist/components/masonry/masonry.d.ts +39 -0
- package/dist/components/masonry/masonry.js +287 -0
- package/dist/components/mentions/mentions.css +172 -0
- package/dist/components/mentions/mentions.d.ts +48 -0
- package/dist/components/mentions/mentions.js +115 -0
- package/dist/components/modal/modal.d.ts +30 -4
- package/dist/components/modal/modal.js +534 -241
- package/dist/components/pagination/pagination.css +10 -0
- package/dist/components/progress/progress.css +187 -0
- package/dist/components/progress/progress.d.ts +66 -0
- package/dist/components/progress/progress.js +567 -0
- package/dist/components/qr-code/qr-code.css +39 -0
- package/dist/components/qr-code/qr-code.d.ts +43 -0
- package/dist/components/qr-code/qr-code.js +286 -0
- package/dist/components/radio/radio.css +7 -0
- package/dist/components/rate/rate.css +97 -0
- package/dist/components/rate/rate.d.ts +17 -0
- package/dist/components/rate/rate.js +172 -0
- package/dist/components/result/result.css +69 -0
- package/dist/components/result/result.d.ts +33 -0
- package/dist/components/result/result.js +320 -0
- package/dist/components/segmented/segmented.css +134 -0
- package/dist/components/segmented/segmented.d.ts +40 -0
- package/dist/components/segmented/segmented.js +169 -0
- package/dist/components/select/mobile-select.d.ts +10 -4
- package/dist/components/select/mobile-select.js +166 -58
- package/dist/components/select/select-tags.js +178 -130
- package/dist/components/select/select-types.d.ts +51 -0
- package/dist/components/select/select.css +69 -10
- package/dist/components/select/select.js +30 -16
- package/dist/components/select/use-select-selection.js +44 -43
- package/dist/components/skeleton/skeleton.css +129 -0
- package/dist/components/skeleton/skeleton.d.ts +78 -0
- package/dist/components/skeleton/skeleton.js +457 -0
- package/dist/components/slider/slider.css +191 -0
- package/dist/components/slider/slider.d.ts +47 -0
- package/dist/components/slider/slider.js +310 -0
- package/dist/components/statistic/statistic.css +34 -0
- package/dist/components/statistic/statistic.d.ts +46 -0
- package/dist/components/statistic/statistic.js +491 -0
- package/dist/components/switch/switch-touch.css +20 -0
- package/dist/components/switch/switch.css +24 -13
- package/dist/components/switch/switch.js +8 -5
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components/time-picker/time-picker.css +205 -0
- package/dist/components/time-picker/time-picker.d.ts +63 -0
- package/dist/components/time-picker/time-picker.js +356 -0
- package/dist/components/timeline/timeline.css +259 -0
- package/dist/components/timeline/timeline.d.ts +50 -0
- package/dist/components/timeline/timeline.js +140 -0
- package/dist/components/tour/tour.css +151 -0
- package/dist/components/tour/tour.d.ts +45 -0
- package/dist/components/tour/tour.js +575 -0
- package/dist/components/transfer/transfer-list.d.ts +2 -0
- package/dist/components/transfer/transfer-list.js +513 -0
- package/dist/components/transfer/transfer-parts.d.ts +3 -0
- package/dist/components/transfer/transfer-parts.js +163 -0
- package/dist/components/transfer/transfer-types.d.ts +163 -0
- package/dist/components/transfer/transfer-types.js +0 -0
- package/dist/components/transfer/transfer.css +226 -0
- package/dist/components/transfer/transfer.d.ts +13 -0
- package/dist/components/transfer/transfer.js +204 -0
- package/dist/components/tree/tree.css +250 -0
- package/dist/components/tree/tree.d.ts +46 -0
- package/dist/components/tree/tree.js +389 -0
- package/dist/components/tree-select/select-engine.css +231 -0
- package/dist/components/tree-select/select-engine.d.ts +20 -0
- package/dist/components/tree-select/select-engine.js +46 -0
- package/dist/components/tree-select/tree-select.css +25 -0
- package/dist/components/tree-select/tree-select.d.ts +50 -0
- package/dist/components/tree-select/tree-select.js +131 -0
- package/dist/components/upload/upload-types.d.ts +135 -0
- package/dist/components/upload/upload-types.js +0 -0
- package/dist/components/upload/upload.css +177 -0
- package/dist/components/upload/upload.d.ts +12 -0
- package/dist/components/upload/upload.js +455 -0
- package/dist/components/watermark/watermark-context.d.ts +7 -0
- package/dist/components/watermark/watermark-context.js +20 -0
- package/dist/components/watermark/watermark.css +10 -0
- package/dist/components/watermark/watermark.d.ts +38 -0
- package/dist/components/watermark/watermark.js +436 -0
- package/dist/docs/component-docs.d.ts +35 -29
- package/dist/docs/component-docs.js +73 -1
- package/dist/docs/components/affix.doc.d.ts +14 -0
- package/dist/docs/components/affix.doc.js +22 -0
- package/dist/docs/components/app.doc.d.ts +18 -0
- package/dist/docs/components/app.doc.js +42 -0
- package/dist/docs/components/auto-complete.doc.d.ts +18 -0
- package/dist/docs/components/auto-complete.doc.js +49 -0
- package/dist/docs/components/avatar.doc.d.ts +17 -0
- package/dist/docs/components/avatar.doc.js +36 -0
- package/dist/docs/components/badge.doc.d.ts +17 -0
- package/dist/docs/components/badge.doc.js +34 -0
- package/dist/docs/components/border-beam.doc.d.ts +14 -0
- package/dist/docs/components/border-beam.doc.js +22 -0
- package/dist/docs/components/calendar.doc.d.ts +18 -0
- package/dist/docs/components/calendar.doc.js +45 -0
- package/dist/docs/components/card.doc.d.ts +17 -0
- package/dist/docs/components/card.doc.js +39 -0
- package/dist/docs/components/carousel.doc.d.ts +15 -0
- package/dist/docs/components/carousel.doc.js +26 -0
- package/dist/docs/components/cascader.doc.d.ts +18 -0
- package/dist/docs/components/cascader.doc.js +54 -0
- package/dist/docs/components/color-picker.doc.d.ts +18 -0
- package/dist/docs/components/color-picker.doc.js +46 -0
- package/dist/docs/components/descriptions.doc.d.ts +14 -0
- package/dist/docs/components/descriptions.doc.js +26 -0
- package/dist/docs/components/divider.doc.d.ts +17 -0
- package/dist/docs/components/divider.doc.js +34 -0
- package/dist/docs/components/empty.doc.d.ts +18 -0
- package/dist/docs/components/empty.doc.js +40 -0
- package/dist/docs/components/float-button.doc.d.ts +14 -0
- package/dist/docs/components/float-button.doc.js +23 -0
- package/dist/docs/components/form.doc.d.ts +1 -1
- package/dist/docs/components/image.doc.d.ts +15 -0
- package/dist/docs/components/image.doc.js +38 -0
- package/dist/docs/components/list.doc.d.ts +18 -0
- package/dist/docs/components/list.doc.js +43 -0
- package/dist/docs/components/listy.doc.d.ts +18 -0
- package/dist/docs/components/listy.doc.js +40 -0
- package/dist/docs/components/masonry.doc.d.ts +14 -0
- package/dist/docs/components/masonry.doc.js +22 -0
- package/dist/docs/components/mentions.doc.d.ts +18 -0
- package/dist/docs/components/mentions.doc.js +43 -0
- package/dist/docs/components/modal.doc.js +3 -0
- package/dist/docs/components/progress.doc.d.ts +18 -0
- package/dist/docs/components/progress.doc.js +41 -0
- package/dist/docs/components/qr-code.doc.d.ts +18 -0
- package/dist/docs/components/qr-code.doc.js +41 -0
- package/dist/docs/components/rate.doc.d.ts +18 -0
- package/dist/docs/components/rate.doc.js +38 -0
- package/dist/docs/components/result.doc.d.ts +18 -0
- package/dist/docs/components/result.doc.js +42 -0
- package/dist/docs/components/segmented.doc.d.ts +14 -0
- package/dist/docs/components/segmented.doc.js +24 -0
- package/dist/docs/components/skeleton.doc.d.ts +18 -0
- package/dist/docs/components/skeleton.doc.js +42 -0
- package/dist/docs/components/slider.doc.d.ts +18 -0
- package/dist/docs/components/slider.doc.js +41 -0
- package/dist/docs/components/statistic.doc.d.ts +14 -0
- package/dist/docs/components/statistic.doc.js +27 -0
- package/dist/docs/components/time-picker.doc.d.ts +18 -0
- package/dist/docs/components/time-picker.doc.js +45 -0
- package/dist/docs/components/timeline.doc.d.ts +14 -0
- package/dist/docs/components/timeline.doc.js +29 -0
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/docs/components/tour.doc.d.ts +15 -0
- package/dist/docs/components/tour.doc.js +36 -0
- package/dist/docs/components/transfer.doc.d.ts +18 -0
- package/dist/docs/components/transfer.doc.js +48 -0
- package/dist/docs/components/tree-select.doc.d.ts +18 -0
- package/dist/docs/components/tree-select.doc.js +55 -0
- package/dist/docs/components/tree.doc.d.ts +18 -0
- package/dist/docs/components/tree.doc.js +46 -0
- package/dist/docs/components/upload.doc.d.ts +18 -0
- package/dist/docs/components/upload.doc.js +43 -0
- package/dist/docs/components/watermark.doc.d.ts +14 -0
- package/dist/docs/components/watermark.doc.js +22 -0
- package/dist/entries/affix.d.ts +3 -0
- package/dist/entries/affix.js +4 -0
- package/dist/entries/app.d.ts +3 -0
- package/dist/entries/app.js +4 -0
- package/dist/entries/auto-complete.d.ts +4 -0
- package/dist/entries/auto-complete.js +4 -0
- package/dist/entries/avatar.d.ts +3 -0
- package/dist/entries/avatar.js +4 -0
- package/dist/entries/badge.d.ts +3 -0
- package/dist/entries/badge.js +4 -0
- package/dist/entries/border-beam.d.ts +3 -0
- package/dist/entries/border-beam.js +4 -0
- package/dist/entries/calendar.d.ts +3 -0
- package/dist/entries/calendar.js +4 -0
- package/dist/entries/card.d.ts +3 -0
- package/dist/entries/card.js +4 -0
- package/dist/entries/carousel.d.ts +3 -0
- package/dist/entries/carousel.js +4 -0
- package/dist/entries/cascader.d.ts +4 -0
- package/dist/entries/cascader.js +4 -0
- package/dist/entries/color-picker.d.ts +5 -0
- package/dist/entries/color-picker.js +4 -0
- package/dist/entries/descriptions.d.ts +3 -0
- package/dist/entries/descriptions.js +4 -0
- package/dist/entries/divider.d.ts +3 -0
- package/dist/entries/divider.js +4 -0
- package/dist/entries/empty.d.ts +3 -0
- package/dist/entries/empty.js +4 -0
- package/dist/entries/float-button.d.ts +3 -0
- package/dist/entries/float-button.js +4 -0
- package/dist/entries/image.d.ts +3 -0
- package/dist/entries/image.js +4 -0
- package/dist/entries/list.d.ts +3 -0
- package/dist/entries/list.js +4 -0
- package/dist/entries/listy.d.ts +3 -0
- package/dist/entries/listy.js +4 -0
- package/dist/entries/masonry.d.ts +3 -0
- package/dist/entries/masonry.js +4 -0
- package/dist/entries/mentions.d.ts +4 -0
- package/dist/entries/mentions.js +4 -0
- package/dist/entries/progress.d.ts +3 -0
- package/dist/entries/progress.js +4 -0
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/provider.js +1 -1
- package/dist/entries/qr-code.d.ts +4 -0
- package/dist/entries/qr-code.js +4 -0
- package/dist/entries/rate.d.ts +3 -0
- package/dist/entries/rate.js +4 -0
- package/dist/entries/result.d.ts +3 -0
- package/dist/entries/result.js +4 -0
- package/dist/entries/segmented.d.ts +3 -0
- package/dist/entries/segmented.js +4 -0
- package/dist/entries/skeleton.d.ts +3 -0
- package/dist/entries/skeleton.js +4 -0
- package/dist/entries/slider.d.ts +3 -0
- package/dist/entries/slider.js +4 -0
- package/dist/entries/statistic.d.ts +3 -0
- package/dist/entries/statistic.js +4 -0
- package/dist/entries/time-picker.d.ts +3 -0
- package/dist/entries/time-picker.js +4 -0
- package/dist/entries/timeline.d.ts +3 -0
- package/dist/entries/timeline.js +4 -0
- package/dist/entries/tour.d.ts +3 -0
- package/dist/entries/tour.js +4 -0
- package/dist/entries/transfer.d.ts +3 -0
- package/dist/entries/transfer.js +4 -0
- package/dist/entries/tree-select.d.ts +4 -0
- package/dist/entries/tree-select.js +4 -0
- package/dist/entries/tree.d.ts +3 -0
- package/dist/entries/tree.js +4 -0
- package/dist/entries/upload.d.ts +4 -0
- package/dist/entries/upload.js +4 -0
- package/dist/entries/util.d.ts +1 -0
- package/dist/entries/util.js +1 -0
- package/dist/entries/watermark.d.ts +3 -0
- package/dist/entries/watermark.js +4 -0
- package/dist/index.d.ts +48 -3
- package/dist/index.js +38 -2
- package/dist/provider/locale.d.ts +59 -0
- package/dist/provider/locale.js +136 -0
- package/dist/provider/tao-provider.d.ts +16 -1
- package/dist/provider/tao-provider.js +104 -87
- package/dist/theme/control.css +10 -0
- package/dist/theme/theme.css +1 -1
- package/dist/utils/breakpoint.d.ts +2 -2
- package/dist/utils/breakpoint.js +3 -1
- package/dist/utils/interop-default.d.ts +2 -0
- package/dist/utils/interop-default.js +4 -0
- package/dist/utils/types.d.ts +7 -0
- package/dist/utils/types.js +0 -0
- package/llms.txt +476 -8
- package/package.json +27 -6
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ColorGenInput } from '@rc-component/color-picker';
|
|
2
|
+
export type ColorFormatType = 'hex' | 'rgb' | 'hsb';
|
|
3
|
+
export type ModeType = 'single' | 'gradient';
|
|
4
|
+
export type LineGradientType = {
|
|
5
|
+
color: string | Color;
|
|
6
|
+
percent: number;
|
|
7
|
+
}[];
|
|
8
|
+
export type ColorValueType = string | Color | null | LineGradientType;
|
|
9
|
+
export type GradientColor = {
|
|
10
|
+
color: Color;
|
|
11
|
+
percent: number;
|
|
12
|
+
}[];
|
|
13
|
+
export declare class Color {
|
|
14
|
+
private base;
|
|
15
|
+
private stops?;
|
|
16
|
+
cleared: boolean;
|
|
17
|
+
constructor(value?: ColorGenInput<Color> | LineGradientType | null);
|
|
18
|
+
toHsb(): {
|
|
19
|
+
b: number;
|
|
20
|
+
a: number;
|
|
21
|
+
h: number;
|
|
22
|
+
s: number;
|
|
23
|
+
};
|
|
24
|
+
toHsbString(): string;
|
|
25
|
+
toHex(): string;
|
|
26
|
+
toHexString(): string;
|
|
27
|
+
toRgb(): import("@ant-design/fast-color").RGB;
|
|
28
|
+
toRgbString(): string;
|
|
29
|
+
isGradient(): boolean;
|
|
30
|
+
getColors(): GradientColor;
|
|
31
|
+
toCssString(): string;
|
|
32
|
+
equals(other: Color | null): boolean;
|
|
33
|
+
}
|
|
34
|
+
export type { ColorGenInput };
|
|
35
|
+
export { Color as AggregationColor };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Color } from "@rc-component/color-picker";
|
|
2
|
+
class color_Color {
|
|
3
|
+
base;
|
|
4
|
+
stops;
|
|
5
|
+
cleared;
|
|
6
|
+
constructor(value = ''){
|
|
7
|
+
if (value instanceof color_Color) {
|
|
8
|
+
this.base = new Color(value.toRgb());
|
|
9
|
+
this.stops = value.stops?.map((stop)=>({
|
|
10
|
+
percent: stop.percent,
|
|
11
|
+
color: new color_Color(stop.color)
|
|
12
|
+
}));
|
|
13
|
+
this.cleared = value.cleared;
|
|
14
|
+
} else if (Array.isArray(value)) {
|
|
15
|
+
this.stops = value.length ? value.map((stop)=>({
|
|
16
|
+
percent: stop.percent,
|
|
17
|
+
color: new color_Color(stop.color)
|
|
18
|
+
})) : void 0;
|
|
19
|
+
this.base = new Color(this.stops?.[0].color.toRgb() ?? 'transparent');
|
|
20
|
+
this.cleared = 0 === value.length;
|
|
21
|
+
} else {
|
|
22
|
+
this.base = new Color(value || 'transparent');
|
|
23
|
+
this.cleared = !value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
toHsb() {
|
|
27
|
+
return this.base.toHsb();
|
|
28
|
+
}
|
|
29
|
+
toHsbString() {
|
|
30
|
+
return this.base.toHsbString();
|
|
31
|
+
}
|
|
32
|
+
toHex() {
|
|
33
|
+
return this.base.toHexString().replace(/^#/, '');
|
|
34
|
+
}
|
|
35
|
+
toHexString() {
|
|
36
|
+
return this.base.toHexString();
|
|
37
|
+
}
|
|
38
|
+
toRgb() {
|
|
39
|
+
return this.base.toRgb();
|
|
40
|
+
}
|
|
41
|
+
toRgbString() {
|
|
42
|
+
return this.base.toRgbString();
|
|
43
|
+
}
|
|
44
|
+
isGradient() {
|
|
45
|
+
return !!this.stops && !this.cleared;
|
|
46
|
+
}
|
|
47
|
+
getColors() {
|
|
48
|
+
return this.stops ?? [
|
|
49
|
+
{
|
|
50
|
+
color: this,
|
|
51
|
+
percent: 0
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
toCssString() {
|
|
56
|
+
return this.stops ? `linear-gradient(90deg, ${this.stops.map((stop)=>`${stop.color.toRgbString()} ${stop.percent}%`).join(', ')})` : this.toRgbString();
|
|
57
|
+
}
|
|
58
|
+
equals(other) {
|
|
59
|
+
if (!other || this.isGradient() !== other.isGradient()) return false;
|
|
60
|
+
if (!this.isGradient()) return this.toHexString() === other.toHexString();
|
|
61
|
+
const right = other.getColors();
|
|
62
|
+
return this.getColors().length === right.length && this.getColors().every((stop, index)=>stop.percent === right[index].percent && stop.color.equals(right[index].color));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export { color_Color as AggregationColor, color_Color as Color };
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { useTaoConfig } from "../../../provider/tao-provider.js";
|
|
4
5
|
import { getCalendarWeeks } from "./use-calendar.js";
|
|
5
|
-
const WEEKDAYS = [
|
|
6
|
-
'Mo',
|
|
7
|
-
'Tu',
|
|
8
|
-
'We',
|
|
9
|
-
'Th',
|
|
10
|
-
'Fr',
|
|
11
|
-
'Sa',
|
|
12
|
-
'Su'
|
|
13
|
-
];
|
|
14
6
|
function CalendarGrid({ viewDate, value, rangeStart, rangeEnd, hoverDate, onSelect, onViewDateChange, onHover, disabledDate, minDate, maxDate, className, style, cellClassName, cellStyle }) {
|
|
7
|
+
const { locale } = useTaoConfig();
|
|
15
8
|
const weeks = getCalendarWeeks(viewDate);
|
|
16
9
|
const today = dayjs();
|
|
17
10
|
const currentMonth = viewDate.month();
|
|
@@ -114,14 +107,14 @@ function CalendarGrid({ viewDate, value, rangeStart, rangeEnd, hoverDate, onSele
|
|
|
114
107
|
return /*#__PURE__*/ jsxs("table", {
|
|
115
108
|
"data-tao-calendar-grid": "",
|
|
116
109
|
role: "grid",
|
|
117
|
-
"aria-label": viewDate.
|
|
110
|
+
"aria-label": locale.calendarTitle(viewDate.month(), viewDate.year()),
|
|
118
111
|
"aria-multiselectable": isRangeMode || void 0,
|
|
119
112
|
className: className,
|
|
120
113
|
style: style,
|
|
121
114
|
children: [
|
|
122
115
|
/*#__PURE__*/ jsx("thead", {
|
|
123
116
|
children: /*#__PURE__*/ jsx("tr", {
|
|
124
|
-
children:
|
|
117
|
+
children: locale.weekdays.map((d)=>/*#__PURE__*/ jsx("th", {
|
|
125
118
|
"data-tao-calendar-weekday": "",
|
|
126
119
|
children: d
|
|
127
120
|
}, d))
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { useTaoConfig } from "../../../provider/tao-provider.js";
|
|
3
4
|
function CalendarHeader(t0) {
|
|
4
|
-
const $ = c(
|
|
5
|
+
const $ = c(63);
|
|
5
6
|
const { viewDate, panelMode, onViewDateChange, onPanelModeChange } = t0;
|
|
7
|
+
const { locale } = useTaoConfig();
|
|
6
8
|
let t1;
|
|
7
9
|
if ($[0] !== onViewDateChange || $[1] !== panelMode || $[2] !== viewDate) {
|
|
8
10
|
t1 = ()=>{
|
|
@@ -71,37 +73,39 @@ function CalendarHeader(t0) {
|
|
|
71
73
|
const handleYearClick = t6;
|
|
72
74
|
const decadeStart = 10 * Math.floor(viewDate.year() / 10);
|
|
73
75
|
let t7;
|
|
74
|
-
if ($[20] !== handleSuperPrev || $[21] !== panelMode) {
|
|
76
|
+
if ($[20] !== handleSuperPrev || $[21] !== locale.previousYear || $[22] !== panelMode) {
|
|
75
77
|
t7 = "date" === panelMode && /*#__PURE__*/ jsx("button", {
|
|
76
78
|
type: "button",
|
|
77
79
|
"data-tao-calendar-nav-btn": "",
|
|
78
80
|
onClick: handleSuperPrev,
|
|
79
|
-
"aria-label":
|
|
81
|
+
"aria-label": locale.previousYear,
|
|
80
82
|
children: /*#__PURE__*/ jsx(DoubleLeftIcon, {})
|
|
81
83
|
});
|
|
82
84
|
$[20] = handleSuperPrev;
|
|
83
|
-
$[21] =
|
|
84
|
-
$[22] =
|
|
85
|
-
|
|
85
|
+
$[21] = locale.previousYear;
|
|
86
|
+
$[22] = panelMode;
|
|
87
|
+
$[23] = t7;
|
|
88
|
+
} else t7 = $[23];
|
|
86
89
|
let t8;
|
|
87
|
-
if ($[
|
|
90
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
88
91
|
t8 = /*#__PURE__*/ jsx(LeftIcon, {});
|
|
89
|
-
$[
|
|
90
|
-
} else t8 = $[
|
|
92
|
+
$[24] = t8;
|
|
93
|
+
} else t8 = $[24];
|
|
91
94
|
let t9;
|
|
92
|
-
if ($[
|
|
95
|
+
if ($[25] !== handlePrev || $[26] !== locale.previous) {
|
|
93
96
|
t9 = /*#__PURE__*/ jsx("button", {
|
|
94
97
|
type: "button",
|
|
95
98
|
"data-tao-calendar-nav-btn": "",
|
|
96
99
|
onClick: handlePrev,
|
|
97
|
-
"aria-label":
|
|
100
|
+
"aria-label": locale.previous,
|
|
98
101
|
children: t8
|
|
99
102
|
});
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
|
|
103
|
+
$[25] = handlePrev;
|
|
104
|
+
$[26] = locale.previous;
|
|
105
|
+
$[27] = t9;
|
|
106
|
+
} else t9 = $[27];
|
|
103
107
|
let t10;
|
|
104
|
-
if ($[
|
|
108
|
+
if ($[28] !== t7 || $[29] !== t9) {
|
|
105
109
|
t10 = /*#__PURE__*/ jsxs("div", {
|
|
106
110
|
"data-tao-calendar-nav": "",
|
|
107
111
|
children: [
|
|
@@ -109,19 +113,19 @@ function CalendarHeader(t0) {
|
|
|
109
113
|
t9
|
|
110
114
|
]
|
|
111
115
|
});
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
} else t10 = $[
|
|
116
|
+
$[28] = t7;
|
|
117
|
+
$[29] = t9;
|
|
118
|
+
$[30] = t10;
|
|
119
|
+
} else t10 = $[30];
|
|
116
120
|
let t11;
|
|
117
|
-
if ($[
|
|
121
|
+
if ($[31] !== handleMonthClick || $[32] !== handleYearClick || $[33] !== locale.months || $[34] !== panelMode || $[35] !== viewDate) {
|
|
118
122
|
t11 = "date" === panelMode && /*#__PURE__*/ jsxs(Fragment, {
|
|
119
123
|
children: [
|
|
120
124
|
/*#__PURE__*/ jsx("button", {
|
|
121
125
|
type: "button",
|
|
122
126
|
"data-tao-calendar-title-btn": "",
|
|
123
127
|
onClick: handleMonthClick,
|
|
124
|
-
children: viewDate.
|
|
128
|
+
children: locale.months[viewDate.month()]
|
|
125
129
|
}),
|
|
126
130
|
/*#__PURE__*/ jsx("button", {
|
|
127
131
|
type: "button",
|
|
@@ -131,27 +135,28 @@ function CalendarHeader(t0) {
|
|
|
131
135
|
})
|
|
132
136
|
]
|
|
133
137
|
});
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
|
|
138
|
+
$[31] = handleMonthClick;
|
|
139
|
+
$[32] = handleYearClick;
|
|
140
|
+
$[33] = locale.months;
|
|
141
|
+
$[34] = panelMode;
|
|
142
|
+
$[35] = viewDate;
|
|
143
|
+
$[36] = t11;
|
|
144
|
+
} else t11 = $[36];
|
|
140
145
|
let t12;
|
|
141
|
-
if ($[
|
|
146
|
+
if ($[37] !== handleYearClick || $[38] !== panelMode || $[39] !== viewDate) {
|
|
142
147
|
t12 = "month" === panelMode && /*#__PURE__*/ jsx("button", {
|
|
143
148
|
type: "button",
|
|
144
149
|
"data-tao-calendar-title-btn": "",
|
|
145
150
|
onClick: handleYearClick,
|
|
146
151
|
children: viewDate.format("YYYY")
|
|
147
152
|
});
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
} else t12 = $[
|
|
153
|
+
$[37] = handleYearClick;
|
|
154
|
+
$[38] = panelMode;
|
|
155
|
+
$[39] = viewDate;
|
|
156
|
+
$[40] = t12;
|
|
157
|
+
} else t12 = $[40];
|
|
153
158
|
let t13;
|
|
154
|
-
if ($[
|
|
159
|
+
if ($[41] !== decadeStart || $[42] !== panelMode) {
|
|
155
160
|
t13 = ("year" === panelMode || "decade" === panelMode) && /*#__PURE__*/ jsxs("span", {
|
|
156
161
|
"data-tao-calendar-title-text": "",
|
|
157
162
|
children: [
|
|
@@ -160,12 +165,12 @@ function CalendarHeader(t0) {
|
|
|
160
165
|
decadeStart + 9
|
|
161
166
|
]
|
|
162
167
|
});
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
} else t13 = $[
|
|
168
|
+
$[41] = decadeStart;
|
|
169
|
+
$[42] = panelMode;
|
|
170
|
+
$[43] = t13;
|
|
171
|
+
} else t13 = $[43];
|
|
167
172
|
let t14;
|
|
168
|
-
if ($[
|
|
173
|
+
if ($[44] !== t11 || $[45] !== t12 || $[46] !== t13) {
|
|
169
174
|
t14 = /*#__PURE__*/ jsxs("div", {
|
|
170
175
|
"data-tao-calendar-title": "",
|
|
171
176
|
children: [
|
|
@@ -174,43 +179,45 @@ function CalendarHeader(t0) {
|
|
|
174
179
|
t13
|
|
175
180
|
]
|
|
176
181
|
});
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
} else t14 = $[
|
|
182
|
+
$[44] = t11;
|
|
183
|
+
$[45] = t12;
|
|
184
|
+
$[46] = t13;
|
|
185
|
+
$[47] = t14;
|
|
186
|
+
} else t14 = $[47];
|
|
182
187
|
let t15;
|
|
183
|
-
if ($[
|
|
188
|
+
if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
|
|
184
189
|
t15 = /*#__PURE__*/ jsx(RightIcon, {});
|
|
185
|
-
$[
|
|
186
|
-
} else t15 = $[
|
|
190
|
+
$[48] = t15;
|
|
191
|
+
} else t15 = $[48];
|
|
187
192
|
let t16;
|
|
188
|
-
if ($[
|
|
193
|
+
if ($[49] !== handleNext || $[50] !== locale.next) {
|
|
189
194
|
t16 = /*#__PURE__*/ jsx("button", {
|
|
190
195
|
type: "button",
|
|
191
196
|
"data-tao-calendar-nav-btn": "",
|
|
192
197
|
onClick: handleNext,
|
|
193
|
-
"aria-label":
|
|
198
|
+
"aria-label": locale.next,
|
|
194
199
|
children: t15
|
|
195
200
|
});
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
|
|
201
|
+
$[49] = handleNext;
|
|
202
|
+
$[50] = locale.next;
|
|
203
|
+
$[51] = t16;
|
|
204
|
+
} else t16 = $[51];
|
|
199
205
|
let t17;
|
|
200
|
-
if ($[
|
|
206
|
+
if ($[52] !== handleSuperNext || $[53] !== locale.nextYear || $[54] !== panelMode) {
|
|
201
207
|
t17 = "date" === panelMode && /*#__PURE__*/ jsx("button", {
|
|
202
208
|
type: "button",
|
|
203
209
|
"data-tao-calendar-nav-btn": "",
|
|
204
210
|
onClick: handleSuperNext,
|
|
205
|
-
"aria-label":
|
|
211
|
+
"aria-label": locale.nextYear,
|
|
206
212
|
children: /*#__PURE__*/ jsx(DoubleRightIcon, {})
|
|
207
213
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
|
|
214
|
+
$[52] = handleSuperNext;
|
|
215
|
+
$[53] = locale.nextYear;
|
|
216
|
+
$[54] = panelMode;
|
|
217
|
+
$[55] = t17;
|
|
218
|
+
} else t17 = $[55];
|
|
212
219
|
let t18;
|
|
213
|
-
if ($[
|
|
220
|
+
if ($[56] !== t16 || $[57] !== t17) {
|
|
214
221
|
t18 = /*#__PURE__*/ jsxs("div", {
|
|
215
222
|
"data-tao-calendar-nav": "",
|
|
216
223
|
children: [
|
|
@@ -218,12 +225,12 @@ function CalendarHeader(t0) {
|
|
|
218
225
|
t17
|
|
219
226
|
]
|
|
220
227
|
});
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
} else t18 = $[
|
|
228
|
+
$[56] = t16;
|
|
229
|
+
$[57] = t17;
|
|
230
|
+
$[58] = t18;
|
|
231
|
+
} else t18 = $[58];
|
|
225
232
|
let t19;
|
|
226
|
-
if ($[
|
|
233
|
+
if ($[59] !== t10 || $[60] !== t14 || $[61] !== t18) {
|
|
227
234
|
t19 = /*#__PURE__*/ jsxs("div", {
|
|
228
235
|
"data-tao-calendar-header": "",
|
|
229
236
|
children: [
|
|
@@ -232,11 +239,11 @@ function CalendarHeader(t0) {
|
|
|
232
239
|
t18
|
|
233
240
|
]
|
|
234
241
|
});
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
} else t19 = $[
|
|
242
|
+
$[59] = t10;
|
|
243
|
+
$[60] = t14;
|
|
244
|
+
$[61] = t18;
|
|
245
|
+
$[62] = t19;
|
|
246
|
+
} else t19 = $[62];
|
|
240
247
|
return t19;
|
|
241
248
|
}
|
|
242
249
|
function LeftIcon() {
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { getMonths } from "./use-calendar.js";
|
|
4
|
-
|
|
5
|
-
'Jan',
|
|
6
|
-
'Feb',
|
|
7
|
-
'Mar',
|
|
8
|
-
'Apr',
|
|
9
|
-
'May',
|
|
10
|
-
'Jun',
|
|
11
|
-
'Jul',
|
|
12
|
-
'Aug',
|
|
13
|
-
'Sep',
|
|
14
|
-
'Oct',
|
|
15
|
-
'Nov',
|
|
16
|
-
'Dec'
|
|
17
|
-
];
|
|
4
|
+
import { useTaoConfig } from "../../../provider/tao-provider.js";
|
|
18
5
|
function MonthGrid(t0) {
|
|
19
|
-
const $ = c(
|
|
6
|
+
const $ = c(12);
|
|
20
7
|
const { viewDate, value, onSelect, disabledDate, minDate, maxDate } = t0;
|
|
8
|
+
const { locale } = useTaoConfig();
|
|
21
9
|
let t1;
|
|
22
10
|
let t2;
|
|
23
|
-
if ($[0] !== disabledDate || $[1] !==
|
|
11
|
+
if ($[0] !== disabledDate || $[1] !== locale || $[2] !== maxDate || $[3] !== minDate || $[4] !== onSelect || $[5] !== value || $[6] !== viewDate) {
|
|
24
12
|
const months = getMonths(viewDate.year());
|
|
25
13
|
t1 = "";
|
|
26
14
|
t2 = months.map((m, i)=>{
|
|
@@ -34,31 +22,32 @@ function MonthGrid(t0) {
|
|
|
34
22
|
"data-tao-disabled": disabled || void 0,
|
|
35
23
|
disabled: disabled,
|
|
36
24
|
onClick: ()=>onSelect(m),
|
|
37
|
-
children:
|
|
25
|
+
children: locale.months[i]
|
|
38
26
|
}, m.format("YYYY-MM"));
|
|
39
27
|
});
|
|
40
28
|
$[0] = disabledDate;
|
|
41
|
-
$[1] =
|
|
42
|
-
$[2] =
|
|
43
|
-
$[3] =
|
|
44
|
-
$[4] =
|
|
45
|
-
$[5] =
|
|
46
|
-
$[6] =
|
|
47
|
-
$[7] =
|
|
29
|
+
$[1] = locale;
|
|
30
|
+
$[2] = maxDate;
|
|
31
|
+
$[3] = minDate;
|
|
32
|
+
$[4] = onSelect;
|
|
33
|
+
$[5] = value;
|
|
34
|
+
$[6] = viewDate;
|
|
35
|
+
$[7] = t1;
|
|
36
|
+
$[8] = t2;
|
|
48
37
|
} else {
|
|
49
|
-
t1 = $[
|
|
50
|
-
t2 = $[
|
|
38
|
+
t1 = $[7];
|
|
39
|
+
t2 = $[8];
|
|
51
40
|
}
|
|
52
41
|
let t3;
|
|
53
|
-
if ($[
|
|
42
|
+
if ($[9] !== t1 || $[10] !== t2) {
|
|
54
43
|
t3 = /*#__PURE__*/ jsx("div", {
|
|
55
44
|
"data-tao-month-grid": t1,
|
|
56
45
|
children: t2
|
|
57
46
|
});
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
} else t3 = $[
|
|
47
|
+
$[9] = t1;
|
|
48
|
+
$[10] = t2;
|
|
49
|
+
$[11] = t3;
|
|
50
|
+
} else t3 = $[11];
|
|
62
51
|
return t3;
|
|
63
52
|
}
|
|
64
53
|
export { MonthGrid };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
|
+
import { useTaoConfig } from "../../../provider/tao-provider.js";
|
|
4
5
|
function TimePanel(t0) {
|
|
5
|
-
const $ = c(
|
|
6
|
+
const $ = c(40);
|
|
6
7
|
const { hour, minute, second, onChange, config, scrollKey } = t0;
|
|
8
|
+
const { locale } = useTaoConfig();
|
|
7
9
|
const hourStep = config?.hourStep ?? 1;
|
|
8
10
|
const minuteStep = config?.minuteStep ?? 1;
|
|
9
11
|
const secondStep = config?.secondStep ?? 1;
|
|
@@ -43,68 +45,71 @@ function TimePanel(t0) {
|
|
|
43
45
|
$[9] = t4;
|
|
44
46
|
} else t4 = $[9];
|
|
45
47
|
let t5;
|
|
46
|
-
if ($[10] !== hour || $[11] !== hours || $[12] !==
|
|
48
|
+
if ($[10] !== hour || $[11] !== hours || $[12] !== locale.hour || $[13] !== scrollKey || $[14] !== t4) {
|
|
47
49
|
t5 = /*#__PURE__*/ jsx(TimeColumn, {
|
|
48
50
|
values: hours,
|
|
49
51
|
selected: hour,
|
|
50
52
|
onSelect: t4,
|
|
51
|
-
label:
|
|
53
|
+
label: locale.hour,
|
|
52
54
|
scrollKey: scrollKey
|
|
53
55
|
});
|
|
54
56
|
$[10] = hour;
|
|
55
57
|
$[11] = hours;
|
|
56
|
-
$[12] =
|
|
57
|
-
$[13] =
|
|
58
|
-
$[14] =
|
|
59
|
-
|
|
58
|
+
$[12] = locale.hour;
|
|
59
|
+
$[13] = scrollKey;
|
|
60
|
+
$[14] = t4;
|
|
61
|
+
$[15] = t5;
|
|
62
|
+
} else t5 = $[15];
|
|
60
63
|
let t6;
|
|
61
|
-
if ($[
|
|
64
|
+
if ($[16] !== hour || $[17] !== onChange || $[18] !== second) {
|
|
62
65
|
t6 = (v_0)=>onChange(hour, v_0, second);
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
} else t6 = $[
|
|
66
|
+
$[16] = hour;
|
|
67
|
+
$[17] = onChange;
|
|
68
|
+
$[18] = second;
|
|
69
|
+
$[19] = t6;
|
|
70
|
+
} else t6 = $[19];
|
|
68
71
|
let t7;
|
|
69
|
-
if ($[
|
|
72
|
+
if ($[20] !== locale.minute || $[21] !== minute || $[22] !== minutes || $[23] !== scrollKey || $[24] !== t6) {
|
|
70
73
|
t7 = /*#__PURE__*/ jsx(TimeColumn, {
|
|
71
74
|
values: minutes,
|
|
72
75
|
selected: minute,
|
|
73
76
|
onSelect: t6,
|
|
74
|
-
label:
|
|
77
|
+
label: locale.minute,
|
|
75
78
|
scrollKey: scrollKey
|
|
76
79
|
});
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
|
|
80
|
+
$[20] = locale.minute;
|
|
81
|
+
$[21] = minute;
|
|
82
|
+
$[22] = minutes;
|
|
83
|
+
$[23] = scrollKey;
|
|
84
|
+
$[24] = t6;
|
|
85
|
+
$[25] = t7;
|
|
86
|
+
} else t7 = $[25];
|
|
83
87
|
let t8;
|
|
84
|
-
if ($[
|
|
88
|
+
if ($[26] !== hour || $[27] !== minute || $[28] !== onChange) {
|
|
85
89
|
t8 = (v_1)=>onChange(hour, minute, v_1);
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
} else t8 = $[
|
|
90
|
+
$[26] = hour;
|
|
91
|
+
$[27] = minute;
|
|
92
|
+
$[28] = onChange;
|
|
93
|
+
$[29] = t8;
|
|
94
|
+
} else t8 = $[29];
|
|
91
95
|
let t9;
|
|
92
|
-
if ($[
|
|
96
|
+
if ($[30] !== locale.second || $[31] !== scrollKey || $[32] !== second || $[33] !== seconds || $[34] !== t8) {
|
|
93
97
|
t9 = /*#__PURE__*/ jsx(TimeColumn, {
|
|
94
98
|
values: seconds,
|
|
95
99
|
selected: second,
|
|
96
100
|
onSelect: t8,
|
|
97
|
-
label:
|
|
101
|
+
label: locale.second,
|
|
98
102
|
scrollKey: scrollKey
|
|
99
103
|
});
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
|
|
104
|
+
$[30] = locale.second;
|
|
105
|
+
$[31] = scrollKey;
|
|
106
|
+
$[32] = second;
|
|
107
|
+
$[33] = seconds;
|
|
108
|
+
$[34] = t8;
|
|
109
|
+
$[35] = t9;
|
|
110
|
+
} else t9 = $[35];
|
|
106
111
|
let t10;
|
|
107
|
-
if ($[
|
|
112
|
+
if ($[36] !== t5 || $[37] !== t7 || $[38] !== t9) {
|
|
108
113
|
t10 = /*#__PURE__*/ jsxs("div", {
|
|
109
114
|
"data-tao-time-panel": "",
|
|
110
115
|
children: [
|
|
@@ -113,11 +118,11 @@ function TimePanel(t0) {
|
|
|
113
118
|
t9
|
|
114
119
|
]
|
|
115
120
|
});
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
} else t10 = $[
|
|
121
|
+
$[36] = t5;
|
|
122
|
+
$[37] = t7;
|
|
123
|
+
$[38] = t9;
|
|
124
|
+
$[39] = t10;
|
|
125
|
+
} else t10 = $[39];
|
|
121
126
|
return t10;
|
|
122
127
|
}
|
|
123
128
|
function TimeColumn(t0) {
|
|
@@ -649,10 +649,14 @@ input[data-tao-range-input]::placeholder {
|
|
|
649
649
|
|
|
650
650
|
[data-tao-range-panel] [data-tao-picker-panel] {
|
|
651
651
|
padding: 0 var(--tao-padding-xs) var(--tao-padding-xs);
|
|
652
|
+
flex: 1;
|
|
652
653
|
width: 280px;
|
|
654
|
+
min-width: 0;
|
|
653
655
|
}
|
|
654
656
|
|
|
655
657
|
[data-tao-range-panel] {
|
|
658
|
+
box-sizing: border-box;
|
|
659
|
+
max-width: calc(100vw - 24px);
|
|
656
660
|
font-family: var(--tao-font-family);
|
|
657
661
|
padding: var(--tao-padding-xs);
|
|
658
662
|
}
|
|
@@ -44,7 +44,7 @@ const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
44
44
|
]);
|
|
45
45
|
const fmt = formatProp ?? getDefaultFormat(picker, showTime);
|
|
46
46
|
const defaultPlaceholder = placeholder ?? fmt;
|
|
47
|
-
const drawerTitle = showTime ?
|
|
47
|
+
const drawerTitle = showTime ? ctx.locale.dateTime : defaultPlaceholder;
|
|
48
48
|
const isDateBlocked = useCallback((date)=>{
|
|
49
49
|
const granularity = 'date' === picker ? 'day' : picker;
|
|
50
50
|
return !date.isValid() || Boolean(disabledDate?.(date)) || null != minDate && date.isBefore(minDate, granularity) || null != maxDate && date.isAfter(maxDate, granularity);
|
|
@@ -305,14 +305,14 @@ const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
305
305
|
type: "button",
|
|
306
306
|
"data-tao-picker-footer-btn": "",
|
|
307
307
|
onClick: handleNow,
|
|
308
|
-
children:
|
|
308
|
+
children: ctx.locale.now
|
|
309
309
|
}),
|
|
310
310
|
/*#__PURE__*/ jsx("button", {
|
|
311
311
|
type: "button",
|
|
312
312
|
"data-tao-picker-footer-btn": "",
|
|
313
313
|
"data-tao-primary": "",
|
|
314
314
|
onClick: handleOk,
|
|
315
|
-
children:
|
|
315
|
+
children: ctx.locale.ok
|
|
316
316
|
})
|
|
317
317
|
]
|
|
318
318
|
})
|
|
@@ -328,7 +328,7 @@ const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
328
328
|
event.stopPropagation();
|
|
329
329
|
handleClear(event);
|
|
330
330
|
},
|
|
331
|
-
"aria-label":
|
|
331
|
+
"aria-label": ctx.locale.clear,
|
|
332
332
|
role: "button",
|
|
333
333
|
tabIndex: 0,
|
|
334
334
|
onKeyDown: (event_0)=>{
|