@rockshin/tao-ui 0.0.1 → 0.0.3
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/breadcrumb/breadcrumb.css +1091 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +43 -0
- package/dist/components/breadcrumb/breadcrumb.js +268 -0
- package/dist/components/button/button.css +46 -21
- package/dist/components/checkbox/checkbox.css +33 -12
- package/dist/components/collapsible/collapsible.css +1026 -0
- package/dist/components/collapsible/collapsible.d.ts +39 -0
- package/dist/components/collapsible/collapsible.js +168 -0
- package/dist/components/context-menu/context-menu.css +1149 -0
- package/dist/components/context-menu/context-menu.d.ts +19 -0
- package/dist/components/context-menu/context-menu.js +106 -0
- package/dist/components/date-picker/calendar/month-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/time-panel.d.ts +1 -1
- package/dist/components/date-picker/calendar/year-grid.d.ts +1 -1
- package/dist/components/date-picker/date-picker.css +87 -17
- package/dist/components/date-picker/date-picker.js +9 -7
- package/dist/components/date-picker/range-picker.js +9 -7
- package/dist/components/drawer/drawer.css +128 -15
- package/dist/components/drawer/drawer.d.ts +36 -3
- package/dist/components/drawer/drawer.js +323 -121
- package/dist/components/dropdown/dropdown.css +999 -0
- package/dist/components/dropdown/dropdown.d.ts +45 -0
- package/dist/components/dropdown/dropdown.js +383 -0
- package/dist/components/form-field/form.css +33 -12
- package/dist/components/input/input.css +86 -14
- package/dist/components/menu/menu-render.d.ts +89 -0
- package/dist/components/menu/menu-render.js +379 -0
- package/dist/components/menu/menu.css +1145 -0
- package/dist/components/modal/confirm-dialog.d.ts +37 -0
- package/dist/components/modal/confirm-dialog.js +193 -0
- package/dist/components/modal/confirm.d.ts +13 -0
- package/dist/components/modal/confirm.js +56 -0
- package/dist/components/modal/index.d.ts +21 -0
- package/dist/components/modal/index.js +18 -0
- package/dist/components/modal/modal.css +1169 -0
- package/dist/components/modal/modal.d.ts +50 -0
- package/dist/components/modal/modal.js +362 -0
- package/dist/components/modal/use-modal.d.ts +21 -0
- package/dist/components/modal/use-modal.js +83 -0
- package/dist/components/pagination/pagination.css +33 -12
- package/dist/components/pagination/pagination.js +3 -1
- package/dist/components/radio/radio.css +33 -12
- package/dist/components/scroll-area/scroll-area.css +33 -12
- package/dist/components/select/mobile-select.css +75 -13
- package/dist/components/select/mobile-select.d.ts +4 -1
- package/dist/components/select/mobile-select.js +103 -107
- package/dist/components/select/select.css +167 -26
- package/dist/components/select/select.d.ts +62 -4
- package/dist/components/select/select.js +359 -377
- package/dist/components/spinner/spinner.css +1084 -0
- package/dist/components/spinner/spinner.d.ts +26 -0
- package/dist/components/spinner/spinner.js +229 -0
- package/dist/components/splitter/splitter.css +33 -12
- package/dist/components/switch/switch.css +33 -12
- package/dist/components/table/table.css +57 -18
- package/dist/components/table/table.d.ts +17 -2
- package/dist/components/table/table.js +214 -206
- package/dist/components/tabs/tabs.css +36 -17
- package/dist/components/tag/tag.css +33 -12
- package/dist/components/textarea/textarea.css +1246 -0
- package/dist/components/textarea/textarea.d.ts +19 -0
- package/dist/components/textarea/textarea.js +181 -0
- package/dist/index.d.ts +25 -18
- package/dist/index.js +22 -15
- package/dist/layouts/stack/layout.css +33 -12
- package/dist/provider/tao-provider.d.ts +17 -1
- package/dist/provider/tao-provider.js +53 -15
- package/dist/theme/control.css +86 -13
- package/dist/theme/theme.css +33 -12
- package/llms.txt +7 -6
- package/package.json +18 -13
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
3
|
+
import { type MenuProps, type MenuSemanticPart } from '../menu/menu-render';
|
|
4
|
+
import './context-menu.css';
|
|
5
|
+
export type ContextMenuSemanticPart = MenuSemanticPart;
|
|
6
|
+
export interface ContextMenuProps {
|
|
7
|
+
menu: MenuProps;
|
|
8
|
+
/** Element whose right-click (long-press on touch) opens the menu. */
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Merged onto the floating content. */
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
classNames?: SemanticClassNames<ContextMenuSemanticPart>;
|
|
17
|
+
styles?: SemanticStyles<ContextMenuSemanticPart>;
|
|
18
|
+
}
|
|
19
|
+
export declare function ContextMenu({ menu, children, open, onOpenChange, disabled, className, style, classNames, styles, }: ContextMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
4
|
+
import { cx } from "../../utils/semantic.js";
|
|
5
|
+
import { useMenuController } from "../menu/menu-render.js";
|
|
6
|
+
import "./context-menu.css";
|
|
7
|
+
import * as __rspack_external__radix_ui_react_context_menu_293d36e3 from "@radix-ui/react-context-menu";
|
|
8
|
+
const CM = {
|
|
9
|
+
Item: __rspack_external__radix_ui_react_context_menu_293d36e3.Item,
|
|
10
|
+
CheckboxItem: __rspack_external__radix_ui_react_context_menu_293d36e3.CheckboxItem,
|
|
11
|
+
RadioGroup: __rspack_external__radix_ui_react_context_menu_293d36e3.RadioGroup,
|
|
12
|
+
RadioItem: __rspack_external__radix_ui_react_context_menu_293d36e3.RadioItem,
|
|
13
|
+
Label: __rspack_external__radix_ui_react_context_menu_293d36e3.Label,
|
|
14
|
+
Separator: __rspack_external__radix_ui_react_context_menu_293d36e3.Separator,
|
|
15
|
+
Group: __rspack_external__radix_ui_react_context_menu_293d36e3.Group,
|
|
16
|
+
Sub: __rspack_external__radix_ui_react_context_menu_293d36e3.Sub,
|
|
17
|
+
SubTrigger: __rspack_external__radix_ui_react_context_menu_293d36e3.SubTrigger,
|
|
18
|
+
SubContent: __rspack_external__radix_ui_react_context_menu_293d36e3.SubContent,
|
|
19
|
+
Portal: __rspack_external__radix_ui_react_context_menu_293d36e3.Portal,
|
|
20
|
+
ItemIndicator: __rspack_external__radix_ui_react_context_menu_293d36e3.ItemIndicator
|
|
21
|
+
};
|
|
22
|
+
function ContextMenu(t0) {
|
|
23
|
+
const $ = c(22);
|
|
24
|
+
const { menu, children, open, onOpenChange, disabled, className, style, classNames, styles } = t0;
|
|
25
|
+
const { size, disabled: ctxDisabled } = useTaoConfig();
|
|
26
|
+
const resolvedDisabled = disabled ?? ctxDisabled;
|
|
27
|
+
let t1;
|
|
28
|
+
if ($[0] !== classNames || $[1] !== styles) {
|
|
29
|
+
t1 = {
|
|
30
|
+
classNames,
|
|
31
|
+
styles
|
|
32
|
+
};
|
|
33
|
+
$[0] = classNames;
|
|
34
|
+
$[1] = styles;
|
|
35
|
+
$[2] = t1;
|
|
36
|
+
} else t1 = $[2];
|
|
37
|
+
const content = useMenuController(menu, CM, t1);
|
|
38
|
+
let t2;
|
|
39
|
+
if ($[3] !== children || $[4] !== resolvedDisabled) {
|
|
40
|
+
t2 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_context_menu_293d36e3.Trigger, {
|
|
41
|
+
disabled: resolvedDisabled,
|
|
42
|
+
"data-tao-context-menu-trigger": "",
|
|
43
|
+
children: children
|
|
44
|
+
});
|
|
45
|
+
$[3] = children;
|
|
46
|
+
$[4] = resolvedDisabled;
|
|
47
|
+
$[5] = t2;
|
|
48
|
+
} else t2 = $[5];
|
|
49
|
+
const t3 = classNames?.content;
|
|
50
|
+
let t4;
|
|
51
|
+
if ($[6] !== className || $[7] !== t3) {
|
|
52
|
+
t4 = cx(t3, className);
|
|
53
|
+
$[6] = className;
|
|
54
|
+
$[7] = t3;
|
|
55
|
+
$[8] = t4;
|
|
56
|
+
} else t4 = $[8];
|
|
57
|
+
const t5 = styles?.content;
|
|
58
|
+
let t6;
|
|
59
|
+
if ($[9] !== style || $[10] !== t5) {
|
|
60
|
+
t6 = {
|
|
61
|
+
...t5,
|
|
62
|
+
...style
|
|
63
|
+
};
|
|
64
|
+
$[9] = style;
|
|
65
|
+
$[10] = t5;
|
|
66
|
+
$[11] = t6;
|
|
67
|
+
} else t6 = $[11];
|
|
68
|
+
let t7;
|
|
69
|
+
if ($[12] !== content || $[13] !== size || $[14] !== t4 || $[15] !== t6) {
|
|
70
|
+
t7 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_context_menu_293d36e3.Portal, {
|
|
71
|
+
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
72
|
+
children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_context_menu_293d36e3.Content, {
|
|
73
|
+
"data-tao-menu-content": "",
|
|
74
|
+
"data-tao-context-menu": "",
|
|
75
|
+
"data-tao-size": size,
|
|
76
|
+
className: t4,
|
|
77
|
+
style: t6,
|
|
78
|
+
children: content
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
$[12] = content;
|
|
83
|
+
$[13] = size;
|
|
84
|
+
$[14] = t4;
|
|
85
|
+
$[15] = t6;
|
|
86
|
+
$[16] = t7;
|
|
87
|
+
} else t7 = $[16];
|
|
88
|
+
let t8;
|
|
89
|
+
if ($[17] !== onOpenChange || $[18] !== open || $[19] !== t2 || $[20] !== t7) {
|
|
90
|
+
t8 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_context_menu_293d36e3.Root, {
|
|
91
|
+
open: open,
|
|
92
|
+
onOpenChange: onOpenChange,
|
|
93
|
+
children: [
|
|
94
|
+
t2,
|
|
95
|
+
t7
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
$[17] = onOpenChange;
|
|
99
|
+
$[18] = open;
|
|
100
|
+
$[19] = t2;
|
|
101
|
+
$[20] = t7;
|
|
102
|
+
$[21] = t8;
|
|
103
|
+
} else t8 = $[21];
|
|
104
|
+
return t8;
|
|
105
|
+
}
|
|
106
|
+
export { ContextMenu };
|
|
@@ -5,5 +5,5 @@ interface MonthGridProps {
|
|
|
5
5
|
onSelect: (date: Dayjs) => void;
|
|
6
6
|
disabledDate?: (date: Dayjs) => boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare function MonthGrid({ viewDate, value, onSelect, disabledDate }: MonthGridProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function MonthGrid({ viewDate, value, onSelect, disabledDate, }: MonthGridProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -8,5 +8,5 @@ interface TimePanelProps {
|
|
|
8
8
|
/** Increment to force scroll-to-selected even when the value hasn't changed */
|
|
9
9
|
scrollKey?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare function TimePanel({ hour, minute, second, onChange, config, scrollKey }: TimePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function TimePanel({ hour, minute, second, onChange, config, scrollKey, }: TimePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -5,5 +5,5 @@ interface YearGridProps {
|
|
|
5
5
|
onSelect: (date: Dayjs) => void;
|
|
6
6
|
disabledDate?: (date: Dayjs) => boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare function YearGrid({ viewDate, value, onSelect, disabledDate }: YearGridProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function YearGrid({ viewDate, value, onSelect, disabledDate, }: YearGridProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -87,7 +87,6 @@
|
|
|
87
87
|
--tao-color-fill-quaternary: color-mix(in oklch, var(--tao-color-text-base) 3%, var(--tao-color-bg-base));
|
|
88
88
|
--tao-color-bg-layout: color-mix(in oklch, var(--tao-color-text-base) 4%, var(--tao-color-bg-base));
|
|
89
89
|
--tao-color-border: color-mix(in oklch, var(--tao-color-text-base) 18%, var(--tao-color-bg-base));
|
|
90
|
-
--tao-color-border-secondary: color-mix(in oklch, var(--tao-color-text-base) 10%, var(--tao-color-bg-base));
|
|
91
90
|
--tao-control-outline: color-mix(in oklch, var(--tao-color-primary) 10%, transparent);
|
|
92
91
|
--tao-color-error-outline: color-mix(in oklch, var(--tao-color-error) 10%, transparent);
|
|
93
92
|
--tao-color-warning-outline: color-mix(in oklch, var(--tao-color-warning) 10%, transparent);
|
|
@@ -350,11 +349,16 @@
|
|
|
350
349
|
--tao-radius: 6px;
|
|
351
350
|
--tao-font-size: 14px;
|
|
352
351
|
--tao-control-height: 36px;
|
|
352
|
+
--tao-control-width: 200px;
|
|
353
|
+
--tao-control-range-width: 360px;
|
|
353
354
|
--tao-size-unit: 4px;
|
|
354
355
|
--tao-line-width: 1px;
|
|
355
356
|
--tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
356
357
|
--tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
357
358
|
--tao-motion-unit: .1s;
|
|
359
|
+
--tao-z-index-drawer: 1000;
|
|
360
|
+
--tao-z-index-modal: 1000;
|
|
361
|
+
--tao-z-index-popup: 1100;
|
|
358
362
|
--tao-primary: var(--tao-color-primary);
|
|
359
363
|
--tao-primary-hover: var(--tao-color-primary);
|
|
360
364
|
}
|
|
@@ -572,8 +576,8 @@
|
|
|
572
576
|
}
|
|
573
577
|
|
|
574
578
|
:root, [data-tao-provider] {
|
|
575
|
-
--tao-color-bg-container:
|
|
576
|
-
--tao-color-bg-elevated:
|
|
579
|
+
--tao-color-bg-container: oklch(100% 0 0);
|
|
580
|
+
--tao-color-bg-elevated: oklch(100% 0 0);
|
|
577
581
|
--tao-color-border: var(--tao-color-text-base);
|
|
578
582
|
}
|
|
579
583
|
|
|
@@ -584,16 +588,7 @@
|
|
|
584
588
|
}
|
|
585
589
|
|
|
586
590
|
:root, [data-tao-provider] {
|
|
587
|
-
--tao-color-border-secondary:
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
591
|
-
:root, [data-tao-provider] {
|
|
592
|
-
--tao-color-border-secondary: color-mix(in oklch, var(--tao-color-text-base) 10%, var(--tao-color-bg-base));
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
:root, [data-tao-provider] {
|
|
591
|
+
--tao-color-border-secondary: #0000170b;
|
|
597
592
|
--tao-radius-xs: 2px;
|
|
598
593
|
--tao-radius-sm: calc(var(--tao-radius) - 2px);
|
|
599
594
|
--tao-radius-md: var(--tao-radius);
|
|
@@ -676,6 +671,10 @@
|
|
|
676
671
|
visibility: collapse;
|
|
677
672
|
}
|
|
678
673
|
|
|
674
|
+
.visible {
|
|
675
|
+
visibility: visible;
|
|
676
|
+
}
|
|
677
|
+
|
|
679
678
|
.absolute {
|
|
680
679
|
position: absolute;
|
|
681
680
|
}
|
|
@@ -758,6 +757,10 @@
|
|
|
758
757
|
display: inline;
|
|
759
758
|
}
|
|
760
759
|
|
|
760
|
+
.inline-flex {
|
|
761
|
+
display: inline-flex;
|
|
762
|
+
}
|
|
763
|
+
|
|
761
764
|
.table {
|
|
762
765
|
display: table;
|
|
763
766
|
}
|
|
@@ -770,6 +773,10 @@
|
|
|
770
773
|
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
771
774
|
}
|
|
772
775
|
|
|
776
|
+
.resize {
|
|
777
|
+
resize: both;
|
|
778
|
+
}
|
|
779
|
+
|
|
773
780
|
.flex-wrap {
|
|
774
781
|
flex-wrap: wrap;
|
|
775
782
|
}
|
|
@@ -785,6 +792,14 @@
|
|
|
785
792
|
border-width: 1px;
|
|
786
793
|
}
|
|
787
794
|
|
|
795
|
+
.italic {
|
|
796
|
+
font-style: italic;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.underline {
|
|
800
|
+
text-decoration-line: underline;
|
|
801
|
+
}
|
|
802
|
+
|
|
788
803
|
.shadow {
|
|
789
804
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
|
|
790
805
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -814,6 +829,24 @@
|
|
|
814
829
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
815
830
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
816
831
|
}
|
|
832
|
+
|
|
833
|
+
.select-all {
|
|
834
|
+
-webkit-user-select: all;
|
|
835
|
+
user-select: all;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
[data-tao-control] {
|
|
840
|
+
box-sizing: border-box;
|
|
841
|
+
width: var(--tao-control-width);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
[data-tao-control][data-tao-range-trigger] {
|
|
845
|
+
width: var(--tao-control-range-width);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
[data-tao-form-field] [data-tao-control] {
|
|
849
|
+
width: 100%;
|
|
817
850
|
}
|
|
818
851
|
|
|
819
852
|
[data-tao-control] {
|
|
@@ -821,8 +854,8 @@
|
|
|
821
854
|
}
|
|
822
855
|
|
|
823
856
|
[data-tao-control][data-tao-variant="outlined"] {
|
|
824
|
-
background: var(--tao-color-bg-container);
|
|
825
857
|
border: var(--tao-line-width) solid var(--tao-color-border);
|
|
858
|
+
background: none;
|
|
826
859
|
}
|
|
827
860
|
|
|
828
861
|
[data-tao-control][data-tao-variant="outlined"]:hover:not([data-disabled]):not(:focus-within):not([data-state="open"]) {
|
|
@@ -848,6 +881,25 @@
|
|
|
848
881
|
box-shadow: 0 0 0 2px var(--tao-color-error-outline);
|
|
849
882
|
}
|
|
850
883
|
|
|
884
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-warning] {
|
|
885
|
+
border-color: var(--tao-warning);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-warning]:hover:not([data-disabled]):not(:focus-within) {
|
|
889
|
+
border-color: var(--tao-color-warning);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
893
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-warning]:hover:not([data-disabled]):not(:focus-within) {
|
|
894
|
+
border-color: color-mix(in oklch, var(--tao-color-warning) 80%, white);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-warning]:focus-within, [data-tao-control][data-tao-variant="outlined"][data-tao-warning][data-state="open"] {
|
|
899
|
+
border-color: var(--tao-warning);
|
|
900
|
+
box-shadow: 0 0 0 2px var(--tao-color-warning-outline);
|
|
901
|
+
}
|
|
902
|
+
|
|
851
903
|
[data-tao-control][data-tao-variant="outlined"][data-disabled], [data-tao-control][data-tao-variant="outlined"]:has(input:disabled) {
|
|
852
904
|
background: var(--tao-color-bg-disabled);
|
|
853
905
|
border-color: var(--tao-color-border);
|
|
@@ -892,6 +944,26 @@
|
|
|
892
944
|
box-shadow: 0 0 0 2px var(--tao-color-error-outline);
|
|
893
945
|
}
|
|
894
946
|
|
|
947
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-warning] {
|
|
948
|
+
background: var(--tao-warning-bg);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-warning]:hover:not([data-disabled]):not(:focus-within) {
|
|
952
|
+
background: var(--tao-color-warning);
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
956
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-warning]:hover:not([data-disabled]):not(:focus-within) {
|
|
957
|
+
background: color-mix(in oklch, var(--tao-color-warning) 10%, var(--tao-color-bg-base));
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-warning]:focus-within, [data-tao-control][data-tao-variant="filled"][data-tao-warning][data-state="open"] {
|
|
962
|
+
background: var(--tao-color-bg-container);
|
|
963
|
+
border-color: var(--tao-warning);
|
|
964
|
+
box-shadow: 0 0 0 2px var(--tao-color-warning-outline);
|
|
965
|
+
}
|
|
966
|
+
|
|
895
967
|
[data-tao-control][data-tao-variant="filled"][data-disabled], [data-tao-control][data-tao-variant="filled"]:has(input:disabled) {
|
|
896
968
|
background: var(--tao-color-bg-disabled);
|
|
897
969
|
border-color: var(--tao-color-border);
|
|
@@ -923,7 +995,6 @@
|
|
|
923
995
|
button[data-tao-picker-trigger] {
|
|
924
996
|
align-items: center;
|
|
925
997
|
gap: var(--tao-padding-xs);
|
|
926
|
-
width: 100%;
|
|
927
998
|
font-family: var(--tao-font-family);
|
|
928
999
|
cursor: pointer;
|
|
929
1000
|
appearance: none;
|
|
@@ -1009,7 +1080,7 @@ button[data-tao-picker-trigger][data-tao-size="large"] {
|
|
|
1009
1080
|
border: var(--tao-line-width) solid var(--tao-color-border);
|
|
1010
1081
|
border-radius: var(--tao-radius-lg);
|
|
1011
1082
|
box-shadow: var(--tao-box-shadow-secondary);
|
|
1012
|
-
z-index:
|
|
1083
|
+
z-index: var(--tao-z-index-popup);
|
|
1013
1084
|
width: auto;
|
|
1014
1085
|
animation: tao-picker-in var(--tao-motion-duration-fast) cubic-bezier(.16, 1, .3, 1);
|
|
1015
1086
|
overflow: hidden;
|
|
@@ -1451,7 +1522,6 @@ button[data-tao-picker-footer-btn][data-tao-primary]:hover {
|
|
|
1451
1522
|
}
|
|
1452
1523
|
|
|
1453
1524
|
button[data-tao-range-trigger] {
|
|
1454
|
-
width: 100%;
|
|
1455
1525
|
font-family: var(--tao-font-family);
|
|
1456
1526
|
cursor: pointer;
|
|
1457
1527
|
appearance: none;
|
|
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
6
|
import { Drawer } from "../drawer/drawer.js";
|
|
7
7
|
import { useIsMobile } from "../select/use-is-mobile.js";
|
|
8
8
|
import { CalendarGrid } from "./calendar/calendar-grid.js";
|
|
@@ -568,12 +568,14 @@ function DatePicker(t0) {
|
|
|
568
568
|
let t42;
|
|
569
569
|
if ($[145] !== panelContent) {
|
|
570
570
|
t42 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_e2827c9f.Portal, {
|
|
571
|
-
children: /*#__PURE__*/ jsx(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
571
|
+
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
572
|
+
children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_e2827c9f.Content, {
|
|
573
|
+
"data-tao-picker-dropdown": "",
|
|
574
|
+
sideOffset: 4,
|
|
575
|
+
align: "start",
|
|
576
|
+
onOpenAutoFocus: _temp3,
|
|
577
|
+
children: panelContent
|
|
578
|
+
})
|
|
577
579
|
})
|
|
578
580
|
});
|
|
579
581
|
$[145] = panelContent;
|
|
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import { useCallback, useState } from "react";
|
|
5
|
-
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
6
|
import { Drawer } from "../drawer/drawer.js";
|
|
7
7
|
import { useIsMobile } from "../select/use-is-mobile.js";
|
|
8
8
|
import { CalendarGrid } from "./calendar/calendar-grid.js";
|
|
@@ -270,12 +270,14 @@ function RangePicker({ value, onChange, picker = 'date', showTime, format: forma
|
|
|
270
270
|
children: trigger
|
|
271
271
|
}),
|
|
272
272
|
/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_e2827c9f.Portal, {
|
|
273
|
-
children: /*#__PURE__*/ jsx(
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
273
|
+
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
274
|
+
children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_e2827c9f.Content, {
|
|
275
|
+
"data-tao-picker-dropdown": "",
|
|
276
|
+
sideOffset: 4,
|
|
277
|
+
align: "start",
|
|
278
|
+
onOpenAutoFocus: (e_1)=>e_1.preventDefault(),
|
|
279
|
+
children: panelContent
|
|
280
|
+
})
|
|
279
281
|
})
|
|
280
282
|
})
|
|
281
283
|
]
|
|
@@ -307,11 +307,16 @@
|
|
|
307
307
|
--tao-radius: 6px;
|
|
308
308
|
--tao-font-size: 14px;
|
|
309
309
|
--tao-control-height: 36px;
|
|
310
|
+
--tao-control-width: 200px;
|
|
311
|
+
--tao-control-range-width: 360px;
|
|
310
312
|
--tao-size-unit: 4px;
|
|
311
313
|
--tao-line-width: 1px;
|
|
312
314
|
--tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
313
315
|
--tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
314
316
|
--tao-motion-unit: .1s;
|
|
317
|
+
--tao-z-index-drawer: 1000;
|
|
318
|
+
--tao-z-index-modal: 1000;
|
|
319
|
+
--tao-z-index-popup: 1100;
|
|
315
320
|
--tao-primary: var(--tao-color-primary);
|
|
316
321
|
--tao-primary-hover: var(--tao-color-primary);
|
|
317
322
|
}
|
|
@@ -529,8 +534,8 @@
|
|
|
529
534
|
}
|
|
530
535
|
|
|
531
536
|
:root, [data-tao-provider] {
|
|
532
|
-
--tao-color-bg-container:
|
|
533
|
-
--tao-color-bg-elevated:
|
|
537
|
+
--tao-color-bg-container: oklch(100% 0 0);
|
|
538
|
+
--tao-color-bg-elevated: oklch(100% 0 0);
|
|
534
539
|
--tao-color-border: var(--tao-color-text-base);
|
|
535
540
|
}
|
|
536
541
|
|
|
@@ -541,16 +546,7 @@
|
|
|
541
546
|
}
|
|
542
547
|
|
|
543
548
|
:root, [data-tao-provider] {
|
|
544
|
-
--tao-color-border-secondary:
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
548
|
-
:root, [data-tao-provider] {
|
|
549
|
-
--tao-color-border-secondary: color-mix(in oklch, var(--tao-color-text-base) 10%, var(--tao-color-bg-base));
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
:root, [data-tao-provider] {
|
|
549
|
+
--tao-color-border-secondary: #0000170b;
|
|
554
550
|
--tao-radius-xs: 2px;
|
|
555
551
|
--tao-radius-sm: calc(var(--tao-radius) - 2px);
|
|
556
552
|
--tao-radius-md: var(--tao-radius);
|
|
@@ -633,6 +629,10 @@
|
|
|
633
629
|
visibility: collapse;
|
|
634
630
|
}
|
|
635
631
|
|
|
632
|
+
.visible {
|
|
633
|
+
visibility: visible;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
636
|
.absolute {
|
|
637
637
|
position: absolute;
|
|
638
638
|
}
|
|
@@ -715,6 +715,10 @@
|
|
|
715
715
|
display: inline;
|
|
716
716
|
}
|
|
717
717
|
|
|
718
|
+
.inline-flex {
|
|
719
|
+
display: inline-flex;
|
|
720
|
+
}
|
|
721
|
+
|
|
718
722
|
.table {
|
|
719
723
|
display: table;
|
|
720
724
|
}
|
|
@@ -727,6 +731,10 @@
|
|
|
727
731
|
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
728
732
|
}
|
|
729
733
|
|
|
734
|
+
.resize {
|
|
735
|
+
resize: both;
|
|
736
|
+
}
|
|
737
|
+
|
|
730
738
|
.flex-wrap {
|
|
731
739
|
flex-wrap: wrap;
|
|
732
740
|
}
|
|
@@ -742,6 +750,14 @@
|
|
|
742
750
|
border-width: 1px;
|
|
743
751
|
}
|
|
744
752
|
|
|
753
|
+
.italic {
|
|
754
|
+
font-style: italic;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.underline {
|
|
758
|
+
text-decoration-line: underline;
|
|
759
|
+
}
|
|
760
|
+
|
|
745
761
|
.shadow {
|
|
746
762
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
|
|
747
763
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -771,16 +787,31 @@
|
|
|
771
787
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
772
788
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
773
789
|
}
|
|
790
|
+
|
|
791
|
+
.select-all {
|
|
792
|
+
-webkit-user-select: all;
|
|
793
|
+
user-select: all;
|
|
794
|
+
}
|
|
774
795
|
}
|
|
775
796
|
|
|
776
797
|
[data-tao-drawer-overlay] {
|
|
777
|
-
z-index:
|
|
798
|
+
z-index: var(--tao-z-index-drawer);
|
|
778
799
|
animation: tao-fade-in var(--tao-motion-duration-mid) ease-out;
|
|
779
|
-
background: oklch(0% 0 0 / .
|
|
800
|
+
background: oklch(0% 0 0 / .1);
|
|
780
801
|
position: fixed;
|
|
781
802
|
inset: 0;
|
|
782
803
|
}
|
|
783
804
|
|
|
805
|
+
@supports (backdrop-filter: blur(4px)) {
|
|
806
|
+
[data-tao-drawer-overlay] {
|
|
807
|
+
backdrop-filter: blur(4px);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
[data-tao-drawer][data-state="closed"], [data-tao-drawer-overlay][data-state="closed"] {
|
|
812
|
+
display: none;
|
|
813
|
+
}
|
|
814
|
+
|
|
784
815
|
@keyframes tao-fade-in {
|
|
785
816
|
0% {
|
|
786
817
|
opacity: 0;
|
|
@@ -792,7 +823,7 @@
|
|
|
792
823
|
}
|
|
793
824
|
|
|
794
825
|
[data-tao-drawer] {
|
|
795
|
-
z-index:
|
|
826
|
+
z-index: calc(var(--tao-z-index-drawer) + 1);
|
|
796
827
|
background: var(--tao-color-bg-elevated);
|
|
797
828
|
box-shadow: var(--tao-box-shadow-secondary);
|
|
798
829
|
font-family: var(--tao-font-family);
|
|
@@ -894,6 +925,18 @@
|
|
|
894
925
|
line-height: 1.4;
|
|
895
926
|
}
|
|
896
927
|
|
|
928
|
+
[data-tao-drawer-actions] {
|
|
929
|
+
align-items: center;
|
|
930
|
+
gap: var(--tao-padding-xs);
|
|
931
|
+
margin-inline-start: auto;
|
|
932
|
+
display: flex;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
[data-tao-drawer-extra] {
|
|
936
|
+
align-items: center;
|
|
937
|
+
display: flex;
|
|
938
|
+
}
|
|
939
|
+
|
|
897
940
|
button[data-tao-drawer-close] {
|
|
898
941
|
border-radius: var(--tao-radius-sm);
|
|
899
942
|
width: 32px;
|
|
@@ -928,6 +971,76 @@ button[data-tao-drawer-close]:focus-visible {
|
|
|
928
971
|
overflow-y: auto;
|
|
929
972
|
}
|
|
930
973
|
|
|
974
|
+
[data-tao-drawer-dragger] {
|
|
975
|
+
z-index: 1;
|
|
976
|
+
-webkit-user-select: none;
|
|
977
|
+
user-select: none;
|
|
978
|
+
touch-action: none;
|
|
979
|
+
transition: background-color var(--tao-motion-duration-fast) ease-out;
|
|
980
|
+
background-color: #0000;
|
|
981
|
+
position: absolute;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
[data-tao-drawer-dragger]:hover {
|
|
985
|
+
background-color: var(--tao-color-primary);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
989
|
+
[data-tao-drawer-dragger]:hover {
|
|
990
|
+
background-color: color-mix(in oklch, var(--tao-color-primary) 20%, transparent);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
[data-tao-drawer-dragger]:active {
|
|
995
|
+
background-color: var(--tao-color-primary);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
999
|
+
[data-tao-drawer-dragger]:active {
|
|
1000
|
+
background-color: color-mix(in oklch, var(--tao-color-primary) 30%, transparent);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
[data-tao-drawer-dragger][data-tao-placement="right"], [data-tao-drawer-dragger][data-tao-placement="left"] {
|
|
1005
|
+
cursor: col-resize;
|
|
1006
|
+
width: 4px;
|
|
1007
|
+
top: 0;
|
|
1008
|
+
bottom: 0;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
[data-tao-drawer-dragger][data-tao-placement="right"] {
|
|
1012
|
+
left: 0;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
[data-tao-drawer-dragger][data-tao-placement="left"] {
|
|
1016
|
+
right: 0;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
[data-tao-drawer-dragger][data-tao-placement="bottom"], [data-tao-drawer-dragger][data-tao-placement="top"] {
|
|
1020
|
+
cursor: row-resize;
|
|
1021
|
+
height: 4px;
|
|
1022
|
+
left: 0;
|
|
1023
|
+
right: 0;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
[data-tao-drawer-dragger][data-tao-placement="bottom"] {
|
|
1027
|
+
top: 0;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
[data-tao-drawer-dragger][data-tao-placement="top"] {
|
|
1031
|
+
bottom: 0;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
[data-tao-drawer-footer] {
|
|
1035
|
+
justify-content: flex-end;
|
|
1036
|
+
align-items: center;
|
|
1037
|
+
gap: var(--tao-padding-xs);
|
|
1038
|
+
padding: var(--tao-padding) var(--tao-padding-lg);
|
|
1039
|
+
border-block-start: var(--tao-line-width) solid var(--tao-color-border-secondary);
|
|
1040
|
+
flex-shrink: 0;
|
|
1041
|
+
display: flex;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
931
1044
|
@property --tw-rotate-x {
|
|
932
1045
|
syntax: "*";
|
|
933
1046
|
inherits: false
|