@rockshin/tao-ui 0.0.1 → 0.0.2
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 +1088 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +43 -0
- package/dist/components/breadcrumb/breadcrumb.js +268 -0
- package/dist/components/button/button.css +43 -21
- package/dist/components/checkbox/checkbox.css +30 -12
- package/dist/components/collapsible/collapsible.css +1023 -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 +1146 -0
- package/dist/components/context-menu/context-menu.d.ts +19 -0
- package/dist/components/context-menu/context-menu.js +104 -0
- package/dist/components/date-picker/date-picker.css +44 -16
- package/dist/components/drawer/drawer.css +123 -13
- package/dist/components/drawer/drawer.d.ts +36 -3
- package/dist/components/drawer/drawer.js +314 -121
- package/dist/components/dropdown/dropdown.css +996 -0
- package/dist/components/dropdown/dropdown.d.ts +45 -0
- package/dist/components/dropdown/dropdown.js +381 -0
- package/dist/components/form-field/form.css +30 -12
- package/dist/components/input/input.css +44 -14
- package/dist/components/menu/menu-render.d.ts +89 -0
- package/dist/components/menu/menu-render.js +376 -0
- package/dist/components/menu/menu.css +1142 -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 +1166 -0
- package/dist/components/modal/modal.d.ts +50 -0
- package/dist/components/modal/modal.js +353 -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 +30 -12
- package/dist/components/radio/radio.css +30 -12
- package/dist/components/scroll-area/scroll-area.css +30 -12
- package/dist/components/select/mobile-select.css +65 -13
- package/dist/components/select/mobile-select.js +17 -3
- package/dist/components/select/select.css +102 -15
- package/dist/components/select/select.d.ts +4 -0
- package/dist/components/select/select.js +204 -168
- package/dist/components/splitter/splitter.css +30 -12
- package/dist/components/switch/switch.css +30 -12
- package/dist/components/table/table.css +54 -18
- package/dist/components/table/table.d.ts +17 -2
- package/dist/components/table/table.js +214 -206
- package/dist/components/tabs/tabs.css +33 -17
- package/dist/components/tag/tag.css +30 -12
- package/dist/components/textarea/textarea.css +1204 -0
- package/dist/components/textarea/textarea.d.ts +19 -0
- package/dist/components/textarea/textarea.js +181 -0
- package/dist/index.d.ts +24 -18
- package/dist/index.js +21 -15
- package/dist/layouts/stack/layout.css +30 -12
- package/dist/theme/control.css +44 -13
- package/dist/theme/theme.css +30 -12
- package/llms.txt +7 -6
- package/package.json +6 -1
|
@@ -307,6 +307,8 @@
|
|
|
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;
|
|
@@ -529,8 +531,8 @@
|
|
|
529
531
|
}
|
|
530
532
|
|
|
531
533
|
:root, [data-tao-provider] {
|
|
532
|
-
--tao-color-bg-container:
|
|
533
|
-
--tao-color-bg-elevated:
|
|
534
|
+
--tao-color-bg-container: oklch(100% 0 0);
|
|
535
|
+
--tao-color-bg-elevated: oklch(100% 0 0);
|
|
534
536
|
--tao-color-border: var(--tao-color-text-base);
|
|
535
537
|
}
|
|
536
538
|
|
|
@@ -541,16 +543,7 @@
|
|
|
541
543
|
}
|
|
542
544
|
|
|
543
545
|
: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] {
|
|
546
|
+
--tao-color-border-secondary: #0000170b;
|
|
554
547
|
--tao-radius-xs: 2px;
|
|
555
548
|
--tao-radius-sm: calc(var(--tao-radius) - 2px);
|
|
556
549
|
--tao-radius-md: var(--tao-radius);
|
|
@@ -633,6 +626,10 @@
|
|
|
633
626
|
visibility: collapse;
|
|
634
627
|
}
|
|
635
628
|
|
|
629
|
+
.visible {
|
|
630
|
+
visibility: visible;
|
|
631
|
+
}
|
|
632
|
+
|
|
636
633
|
.absolute {
|
|
637
634
|
position: absolute;
|
|
638
635
|
}
|
|
@@ -715,6 +712,10 @@
|
|
|
715
712
|
display: inline;
|
|
716
713
|
}
|
|
717
714
|
|
|
715
|
+
.inline-flex {
|
|
716
|
+
display: inline-flex;
|
|
717
|
+
}
|
|
718
|
+
|
|
718
719
|
.table {
|
|
719
720
|
display: table;
|
|
720
721
|
}
|
|
@@ -727,6 +728,10 @@
|
|
|
727
728
|
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
728
729
|
}
|
|
729
730
|
|
|
731
|
+
.resize {
|
|
732
|
+
resize: both;
|
|
733
|
+
}
|
|
734
|
+
|
|
730
735
|
.flex-wrap {
|
|
731
736
|
flex-wrap: wrap;
|
|
732
737
|
}
|
|
@@ -742,6 +747,14 @@
|
|
|
742
747
|
border-width: 1px;
|
|
743
748
|
}
|
|
744
749
|
|
|
750
|
+
.italic {
|
|
751
|
+
font-style: italic;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.underline {
|
|
755
|
+
text-decoration-line: underline;
|
|
756
|
+
}
|
|
757
|
+
|
|
745
758
|
.shadow {
|
|
746
759
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
|
|
747
760
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -771,6 +784,11 @@
|
|
|
771
784
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
772
785
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
773
786
|
}
|
|
787
|
+
|
|
788
|
+
.select-all {
|
|
789
|
+
-webkit-user-select: all;
|
|
790
|
+
user-select: all;
|
|
791
|
+
}
|
|
774
792
|
}
|
|
775
793
|
|
|
776
794
|
button[data-tao-switch] {
|
|
@@ -307,6 +307,8 @@
|
|
|
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;
|
|
@@ -529,8 +531,8 @@
|
|
|
529
531
|
}
|
|
530
532
|
|
|
531
533
|
:root, [data-tao-provider] {
|
|
532
|
-
--tao-color-bg-container:
|
|
533
|
-
--tao-color-bg-elevated:
|
|
534
|
+
--tao-color-bg-container: oklch(100% 0 0);
|
|
535
|
+
--tao-color-bg-elevated: oklch(100% 0 0);
|
|
534
536
|
--tao-color-border: var(--tao-color-text-base);
|
|
535
537
|
}
|
|
536
538
|
|
|
@@ -541,16 +543,7 @@
|
|
|
541
543
|
}
|
|
542
544
|
|
|
543
545
|
: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] {
|
|
546
|
+
--tao-color-border-secondary: #0000170b;
|
|
554
547
|
--tao-radius-xs: 2px;
|
|
555
548
|
--tao-radius-sm: calc(var(--tao-radius) - 2px);
|
|
556
549
|
--tao-radius-md: var(--tao-radius);
|
|
@@ -633,6 +626,10 @@
|
|
|
633
626
|
visibility: collapse;
|
|
634
627
|
}
|
|
635
628
|
|
|
629
|
+
.visible {
|
|
630
|
+
visibility: visible;
|
|
631
|
+
}
|
|
632
|
+
|
|
636
633
|
.absolute {
|
|
637
634
|
position: absolute;
|
|
638
635
|
}
|
|
@@ -715,6 +712,10 @@
|
|
|
715
712
|
display: inline;
|
|
716
713
|
}
|
|
717
714
|
|
|
715
|
+
.inline-flex {
|
|
716
|
+
display: inline-flex;
|
|
717
|
+
}
|
|
718
|
+
|
|
718
719
|
.table {
|
|
719
720
|
display: table;
|
|
720
721
|
}
|
|
@@ -727,6 +728,10 @@
|
|
|
727
728
|
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
728
729
|
}
|
|
729
730
|
|
|
731
|
+
.resize {
|
|
732
|
+
resize: both;
|
|
733
|
+
}
|
|
734
|
+
|
|
730
735
|
.flex-wrap {
|
|
731
736
|
flex-wrap: wrap;
|
|
732
737
|
}
|
|
@@ -742,6 +747,14 @@
|
|
|
742
747
|
border-width: 1px;
|
|
743
748
|
}
|
|
744
749
|
|
|
750
|
+
.italic {
|
|
751
|
+
font-style: italic;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.underline {
|
|
755
|
+
text-decoration-line: underline;
|
|
756
|
+
}
|
|
757
|
+
|
|
745
758
|
.shadow {
|
|
746
759
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
|
|
747
760
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -771,14 +784,36 @@
|
|
|
771
784
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
772
785
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
773
786
|
}
|
|
787
|
+
|
|
788
|
+
.select-all {
|
|
789
|
+
-webkit-user-select: all;
|
|
790
|
+
user-select: all;
|
|
791
|
+
}
|
|
774
792
|
}
|
|
775
793
|
|
|
776
794
|
[data-tao-table-wrapper] {
|
|
777
795
|
font-family: var(--tao-font-family);
|
|
778
796
|
color: var(--tao-color-text);
|
|
797
|
+
--tao-table-cell-bg: transparent;
|
|
798
|
+
--tao-table-header-bg: transparent;
|
|
799
|
+
--tao-table-header-color: var(--tao-color-text-secondary);
|
|
800
|
+
--tao-table-row-hover-bg: oklch(0% 0 0 / .02);
|
|
801
|
+
--tao-table-row-selected-bg: oklch(0% 0 0 / .05);
|
|
802
|
+
--tao-table-row-selected-hover-bg: oklch(0% 0 0 / .07);
|
|
779
803
|
position: relative;
|
|
780
804
|
}
|
|
781
805
|
|
|
806
|
+
[data-tao-table-wrapper][data-tao-variant="filled"], [data-tao-table-wrapper][data-tao-variant="outlined"] {
|
|
807
|
+
--tao-table-header-bg: oklch(98.5% 0 0);
|
|
808
|
+
--tao-table-row-hover-bg: oklch(98.5% 0 0);
|
|
809
|
+
--tao-table-row-selected-bg: var(--tao-primary-bg);
|
|
810
|
+
--tao-table-row-selected-hover-bg: var(--tao-primary-bg-hover);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
[data-tao-table-wrapper][data-tao-header-bg="off"] {
|
|
814
|
+
--tao-table-header-bg: transparent;
|
|
815
|
+
}
|
|
816
|
+
|
|
782
817
|
[data-tao-table-scroll] {
|
|
783
818
|
position: relative;
|
|
784
819
|
overflow-x: auto;
|
|
@@ -798,7 +833,7 @@
|
|
|
798
833
|
padding: var(--tao-padding-sm) var(--tao-padding);
|
|
799
834
|
text-align: left;
|
|
800
835
|
border-bottom: var(--tao-line-width) solid var(--tao-color-border-secondary);
|
|
801
|
-
background: var(--tao-
|
|
836
|
+
background: var(--tao-table-cell-bg);
|
|
802
837
|
transition: background-color var(--tao-motion-duration-fast) var(--tao-motion-ease-out);
|
|
803
838
|
}
|
|
804
839
|
|
|
@@ -818,8 +853,8 @@
|
|
|
818
853
|
|
|
819
854
|
[data-tao-table-thead] [data-tao-table-cell] {
|
|
820
855
|
font-weight: var(--tao-font-weight-medium);
|
|
821
|
-
color: var(--tao-
|
|
822
|
-
background: var(--tao-
|
|
856
|
+
color: var(--tao-table-header-color);
|
|
857
|
+
background: var(--tao-table-header-bg);
|
|
823
858
|
white-space: nowrap;
|
|
824
859
|
}
|
|
825
860
|
|
|
@@ -948,15 +983,15 @@
|
|
|
948
983
|
}
|
|
949
984
|
|
|
950
985
|
[data-tao-table-row]:hover [data-tao-table-cell] {
|
|
951
|
-
background: var(--tao-
|
|
986
|
+
background: var(--tao-table-row-hover-bg);
|
|
952
987
|
}
|
|
953
988
|
|
|
954
989
|
[data-tao-table-row][data-tao-selected] [data-tao-table-cell] {
|
|
955
|
-
background: var(--tao-
|
|
990
|
+
background: var(--tao-table-row-selected-bg);
|
|
956
991
|
}
|
|
957
992
|
|
|
958
993
|
[data-tao-table-row][data-tao-selected]:hover [data-tao-table-cell] {
|
|
959
|
-
background: var(--tao-
|
|
994
|
+
background: var(--tao-table-row-selected-hover-bg);
|
|
960
995
|
}
|
|
961
996
|
|
|
962
997
|
[data-tao-table-selection-cell] {
|
|
@@ -971,6 +1006,7 @@
|
|
|
971
1006
|
|
|
972
1007
|
[data-tao-table-cell][data-tao-fixed] {
|
|
973
1008
|
z-index: 1;
|
|
1009
|
+
background: var(--tao-color-bg-container);
|
|
974
1010
|
position: sticky;
|
|
975
1011
|
}
|
|
976
1012
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type TaoSize } from '../../provider/tao-provider';
|
|
2
|
+
import { type TaoSize, type TaoVariant } from '../../provider/tao-provider';
|
|
3
3
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
4
4
|
import './table.css';
|
|
5
5
|
export type TableSemanticPart = 'root' | 'header.cell' | 'body.row' | 'body.cell' | 'pagination';
|
|
@@ -64,10 +64,25 @@ export interface TableProps<T = any> {
|
|
|
64
64
|
};
|
|
65
65
|
rowSelection?: TableRowSelection<T>;
|
|
66
66
|
size?: TaoSize;
|
|
67
|
+
/**
|
|
68
|
+
* 表面风格。
|
|
69
|
+
* - `borderless`(极简):无表头底色、单元格透明、仅行底分隔线。
|
|
70
|
+
* - `filled`:表头灰底(库的默认表现)。
|
|
71
|
+
* - `outlined`:filled + 整体外框 + 列分隔线。
|
|
72
|
+
*
|
|
73
|
+
* 不传时继承 TaoProvider 的 variant;当继承到框架默认 `outlined` 时,
|
|
74
|
+
* Table 回落为 `filled` 以保持向后兼容(裸用 `<Table>` 仍是灰底表头)。
|
|
75
|
+
*/
|
|
76
|
+
variant?: TaoVariant;
|
|
77
|
+
/**
|
|
78
|
+
* 表头灰底开关,默认 `true`。设为 `false` 关掉表头底色(极简表头),
|
|
79
|
+
* 不影响外框 / 列分隔线等其它 variant 表现。
|
|
80
|
+
*/
|
|
81
|
+
headerBackground?: boolean;
|
|
67
82
|
emptyText?: ReactNode;
|
|
68
83
|
bordered?: boolean;
|
|
69
84
|
className?: string;
|
|
70
85
|
classNames?: SemanticClassNames<TableSemanticPart>;
|
|
71
86
|
styles?: SemanticStyles<TableSemanticPart>;
|
|
72
87
|
}
|
|
73
|
-
export declare function Table<T = any>({ columns, dataSource, rowKey, loading, pagination: paginationProp, onChange, scroll, rowSelection, size, emptyText, bordered, className, classNames, styles, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
export declare function Table<T = any>({ columns, dataSource, rowKey, loading, pagination: paginationProp, onChange, scroll, rowSelection, size, variant, headerBackground, emptyText, bordered, className, classNames, styles, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|