@rockshin/tao-ui 0.0.2 → 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.
Files changed (49) hide show
  1. package/dist/components/breadcrumb/breadcrumb.css +3 -0
  2. package/dist/components/button/button.css +3 -0
  3. package/dist/components/checkbox/checkbox.css +3 -0
  4. package/dist/components/collapsible/collapsible.css +3 -0
  5. package/dist/components/context-menu/context-menu.css +4 -1
  6. package/dist/components/context-menu/context-menu.js +10 -8
  7. package/dist/components/date-picker/calendar/month-grid.d.ts +1 -1
  8. package/dist/components/date-picker/calendar/time-panel.d.ts +1 -1
  9. package/dist/components/date-picker/calendar/year-grid.d.ts +1 -1
  10. package/dist/components/date-picker/date-picker.css +43 -1
  11. package/dist/components/date-picker/date-picker.js +9 -7
  12. package/dist/components/date-picker/range-picker.js +9 -7
  13. package/dist/components/drawer/drawer.css +5 -2
  14. package/dist/components/drawer/drawer.js +27 -18
  15. package/dist/components/dropdown/dropdown.css +3 -0
  16. package/dist/components/dropdown/dropdown.js +17 -15
  17. package/dist/components/form-field/form.css +3 -0
  18. package/dist/components/input/input.css +42 -0
  19. package/dist/components/menu/menu-render.js +11 -8
  20. package/dist/components/menu/menu.css +4 -1
  21. package/dist/components/modal/modal.css +5 -2
  22. package/dist/components/modal/modal.js +27 -18
  23. package/dist/components/pagination/pagination.css +3 -0
  24. package/dist/components/pagination/pagination.js +3 -1
  25. package/dist/components/radio/radio.css +3 -0
  26. package/dist/components/scroll-area/scroll-area.css +3 -0
  27. package/dist/components/select/mobile-select.css +10 -0
  28. package/dist/components/select/mobile-select.d.ts +4 -1
  29. package/dist/components/select/mobile-select.js +103 -121
  30. package/dist/components/select/select.css +65 -11
  31. package/dist/components/select/select.d.ts +58 -4
  32. package/dist/components/select/select.js +356 -410
  33. package/dist/components/spinner/spinner.css +1084 -0
  34. package/dist/components/spinner/spinner.d.ts +26 -0
  35. package/dist/components/spinner/spinner.js +229 -0
  36. package/dist/components/splitter/splitter.css +3 -0
  37. package/dist/components/switch/switch.css +3 -0
  38. package/dist/components/table/table.css +3 -0
  39. package/dist/components/tabs/tabs.css +3 -0
  40. package/dist/components/tag/tag.css +3 -0
  41. package/dist/components/textarea/textarea.css +42 -0
  42. package/dist/index.d.ts +4 -3
  43. package/dist/index.js +4 -3
  44. package/dist/layouts/stack/layout.css +3 -0
  45. package/dist/provider/tao-provider.d.ts +17 -1
  46. package/dist/provider/tao-provider.js +53 -15
  47. package/dist/theme/control.css +42 -0
  48. package/dist/theme/theme.css +3 -0
  49. package/package.json +13 -13
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -801,7 +804,7 @@
801
804
  box-shadow: var(--tao-box-shadow-secondary);
802
805
  font-family: var(--tao-font-family);
803
806
  color: var(--tao-color-text);
804
- z-index: 1000;
807
+ z-index: var(--tao-z-index-popup);
805
808
  animation-duration: var(--tao-motion-duration-fast);
806
809
  animation-timing-function: var(--tao-motion-ease-out-quint);
807
810
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
- import { useTaoConfig } from "../../provider/tao-provider.js";
3
+ import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
4
4
  import { cx } from "../../utils/semantic.js";
5
5
  import { useMenuController } from "../menu/menu-render.js";
6
6
  import "./context-menu.css";
@@ -68,13 +68,15 @@ function ContextMenu(t0) {
68
68
  let t7;
69
69
  if ($[12] !== content || $[13] !== size || $[14] !== t4 || $[15] !== t6) {
70
70
  t7 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_context_menu_293d36e3.Portal, {
71
- children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_context_menu_293d36e3.Content, {
72
- "data-tao-menu-content": "",
73
- "data-tao-context-menu": "",
74
- "data-tao-size": size,
75
- className: t4,
76
- style: t6,
77
- children: content
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
+ })
78
80
  })
79
81
  });
80
82
  $[12] = content;
@@ -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 {};
@@ -356,6 +356,9 @@
356
356
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
357
357
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
358
358
  --tao-motion-unit: .1s;
359
+ --tao-z-index-drawer: 1000;
360
+ --tao-z-index-modal: 1000;
361
+ --tao-z-index-popup: 1100;
359
362
  --tao-primary: var(--tao-color-primary);
360
363
  --tao-primary-hover: var(--tao-color-primary);
361
364
  }
@@ -878,6 +881,25 @@
878
881
  box-shadow: 0 0 0 2px var(--tao-color-error-outline);
879
882
  }
880
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
+
881
903
  [data-tao-control][data-tao-variant="outlined"][data-disabled], [data-tao-control][data-tao-variant="outlined"]:has(input:disabled) {
882
904
  background: var(--tao-color-bg-disabled);
883
905
  border-color: var(--tao-color-border);
@@ -922,6 +944,26 @@
922
944
  box-shadow: 0 0 0 2px var(--tao-color-error-outline);
923
945
  }
924
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
+
925
967
  [data-tao-control][data-tao-variant="filled"][data-disabled], [data-tao-control][data-tao-variant="filled"]:has(input:disabled) {
926
968
  background: var(--tao-color-bg-disabled);
927
969
  border-color: var(--tao-color-border);
@@ -1038,7 +1080,7 @@ button[data-tao-picker-trigger][data-tao-size="large"] {
1038
1080
  border: var(--tao-line-width) solid var(--tao-color-border);
1039
1081
  border-radius: var(--tao-radius-lg);
1040
1082
  box-shadow: var(--tao-box-shadow-secondary);
1041
- z-index: 1000;
1083
+ z-index: var(--tao-z-index-popup);
1042
1084
  width: auto;
1043
1085
  animation: tao-picker-in var(--tao-motion-duration-fast) cubic-bezier(.16, 1, .3, 1);
1044
1086
  overflow: hidden;
@@ -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(__rspack_external__radix_ui_react_popover_e2827c9f.Content, {
572
- "data-tao-picker-dropdown": "",
573
- sideOffset: 4,
574
- align: "start",
575
- onOpenAutoFocus: _temp3,
576
- children: panelContent
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(__rspack_external__radix_ui_react_popover_e2827c9f.Content, {
274
- "data-tao-picker-dropdown": "",
275
- sideOffset: 4,
276
- align: "start",
277
- onOpenAutoFocus: (e_1)=>e_1.preventDefault(),
278
- children: panelContent
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
  ]
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -792,7 +795,7 @@
792
795
  }
793
796
 
794
797
  [data-tao-drawer-overlay] {
795
- z-index: 999;
798
+ z-index: var(--tao-z-index-drawer);
796
799
  animation: tao-fade-in var(--tao-motion-duration-mid) ease-out;
797
800
  background: oklch(0% 0 0 / .1);
798
801
  position: fixed;
@@ -820,7 +823,7 @@
820
823
  }
821
824
 
822
825
  [data-tao-drawer] {
823
- z-index: 1000;
826
+ z-index: calc(var(--tao-z-index-drawer) + 1);
824
827
  background: var(--tao-color-bg-elevated);
825
828
  box-shadow: var(--tao-box-shadow-secondary);
826
829
  font-family: var(--tao-font-family);
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useEffect, useRef, useState } from "react";
4
+ import { TaoPortalScope } from "../../provider/tao-provider.js";
4
5
  import { cx } from "../../utils/semantic.js";
5
6
  import "./drawer.css";
6
7
  import * as __rspack_external__radix_ui_react_dialog_6b867f3d from "@radix-ui/react-dialog";
@@ -10,7 +11,7 @@ const SIZE_PRESET = {
10
11
  };
11
12
  const MIN_DRAG_SIZE = 200;
12
13
  function Drawer(t0) {
13
- const $ = c(88);
14
+ const $ = c(90);
14
15
  const { open, onClose, title, extra, footer, placement: t1, size, width, height, closable: t2, closeIcon, maskClosable: t3, mask: t4, keyboard: t5, resizable, afterOpenChange, afterClose, destroyOnHidden: t6, children, classNames, styles: stylesProp } = t0;
15
16
  const placement = void 0 === t1 ? "right" : t1;
16
17
  const closable = void 0 === t2 ? true : t2;
@@ -326,32 +327,40 @@ function Drawer(t0) {
326
327
  $[79] = t27;
327
328
  } else t27 = $[79];
328
329
  let t28;
329
- if ($[80] !== forceMount || $[81] !== t14 || $[82] !== t27) {
330
- t28 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_6b867f3d.Portal, {
331
- forceMount: forceMount,
330
+ if ($[80] !== t14 || $[81] !== t27) {
331
+ t28 = /*#__PURE__*/ jsxs(TaoPortalScope, {
332
332
  children: [
333
333
  t14,
334
334
  t27
335
335
  ]
336
336
  });
337
- $[80] = forceMount;
338
- $[81] = t14;
339
- $[82] = t27;
340
- $[83] = t28;
341
- } else t28 = $[83];
337
+ $[80] = t14;
338
+ $[81] = t27;
339
+ $[82] = t28;
340
+ } else t28 = $[82];
342
341
  let t29;
343
- if ($[84] !== open || $[85] !== t13 || $[86] !== t28) {
344
- t29 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_6b867f3d.Root, {
342
+ if ($[83] !== forceMount || $[84] !== t28) {
343
+ t29 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_6b867f3d.Portal, {
344
+ forceMount: forceMount,
345
+ children: t28
346
+ });
347
+ $[83] = forceMount;
348
+ $[84] = t28;
349
+ $[85] = t29;
350
+ } else t29 = $[85];
351
+ let t30;
352
+ if ($[86] !== open || $[87] !== t13 || $[88] !== t29) {
353
+ t30 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_6b867f3d.Root, {
345
354
  open: open,
346
355
  onOpenChange: t13,
347
- children: t28
356
+ children: t29
348
357
  });
349
- $[84] = open;
350
- $[85] = t13;
351
- $[86] = t28;
352
- $[87] = t29;
353
- } else t29 = $[87];
354
- return t29;
358
+ $[86] = open;
359
+ $[87] = t13;
360
+ $[88] = t29;
361
+ $[89] = t30;
362
+ } else t30 = $[89];
363
+ return t30;
355
364
  }
356
365
  function CloseIcon() {
357
366
  const $ = c(1);
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { isValidElement, useRef, useState } from "react";
4
- import { useTaoConfig } from "../../provider/tao-provider.js";
4
+ import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
5
5
  import { cx } from "../../utils/semantic.js";
6
6
  import { Button } from "../button/button.js";
7
7
  import { ContextMenu } from "../context-menu/context-menu.js";
@@ -239,20 +239,22 @@ function Dropdown(props) {
239
239
  let t19;
240
240
  if ($[47] !== align || $[48] !== content || $[49] !== hoverProps || $[50] !== side || $[51] !== size || $[52] !== t15 || $[53] !== t17 || $[54] !== t18) {
241
241
  t19 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_dbc6754d.Portal, {
242
- children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_dbc6754d.Content, {
243
- "data-tao-menu-content": "",
244
- "data-tao-dropdown": "",
245
- "data-tao-size": size,
246
- className: t15,
247
- style: t17,
248
- side: side,
249
- align: align,
250
- sideOffset: 4,
251
- ...hoverProps,
252
- children: [
253
- t18,
254
- content
255
- ]
242
+ children: /*#__PURE__*/ jsx(TaoPortalScope, {
243
+ children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_dbc6754d.Content, {
244
+ "data-tao-menu-content": "",
245
+ "data-tao-dropdown": "",
246
+ "data-tao-size": size,
247
+ className: t15,
248
+ style: t17,
249
+ side: side,
250
+ align: align,
251
+ sideOffset: 4,
252
+ ...hoverProps,
253
+ children: [
254
+ t18,
255
+ content
256
+ ]
257
+ })
256
258
  })
257
259
  });
258
260
  $[47] = align;
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -356,6 +356,9 @@
356
356
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
357
357
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
358
358
  --tao-motion-unit: .1s;
359
+ --tao-z-index-drawer: 1000;
360
+ --tao-z-index-modal: 1000;
361
+ --tao-z-index-popup: 1100;
359
362
  --tao-primary: var(--tao-color-primary);
360
363
  --tao-primary-hover: var(--tao-color-primary);
361
364
  }
@@ -878,6 +881,25 @@
878
881
  box-shadow: 0 0 0 2px var(--tao-color-error-outline);
879
882
  }
880
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
+
881
903
  [data-tao-control][data-tao-variant="outlined"][data-disabled], [data-tao-control][data-tao-variant="outlined"]:has(input:disabled) {
882
904
  background: var(--tao-color-bg-disabled);
883
905
  border-color: var(--tao-color-border);
@@ -922,6 +944,26 @@
922
944
  box-shadow: 0 0 0 2px var(--tao-color-error-outline);
923
945
  }
924
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
+
925
967
  [data-tao-control][data-tao-variant="filled"][data-disabled], [data-tao-control][data-tao-variant="filled"]:has(input:disabled) {
926
968
  background: var(--tao-color-bg-disabled);
927
969
  border-color: var(--tao-color-border);
@@ -1,6 +1,7 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useState } from "react";
4
+ import { TaoPortalScope } from "../../provider/tao-provider.js";
4
5
  import { cx } from "../../utils/semantic.js";
5
6
  import "./menu.css";
6
7
  function ChevronRightIcon() {
@@ -177,14 +178,16 @@ function renderMenuItems(items, ctx) {
177
178
  ]
178
179
  }),
179
180
  /*#__PURE__*/ jsx(P.Portal, {
180
- children: /*#__PURE__*/ jsx(P.SubContent, {
181
- "data-tao-menu-content": "",
182
- "data-tao-menu-sub-content": "",
183
- className: cx(ctx.classNames?.subContent),
184
- style: ctx.styles?.subContent,
185
- sideOffset: 2,
186
- alignOffset: -4,
187
- children: renderMenuItems(item.children, ctx)
181
+ children: /*#__PURE__*/ jsx(TaoPortalScope, {
182
+ children: /*#__PURE__*/ jsx(P.SubContent, {
183
+ "data-tao-menu-content": "",
184
+ "data-tao-menu-sub-content": "",
185
+ className: cx(ctx.classNames?.subContent),
186
+ style: ctx.styles?.subContent,
187
+ sideOffset: 2,
188
+ alignOffset: -4,
189
+ children: renderMenuItems(item.children, ctx)
190
+ })
188
191
  })
189
192
  })
190
193
  ]
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -801,7 +804,7 @@
801
804
  box-shadow: var(--tao-box-shadow-secondary);
802
805
  font-family: var(--tao-font-family);
803
806
  color: var(--tao-color-text);
804
- z-index: 1000;
807
+ z-index: var(--tao-z-index-popup);
805
808
  animation-duration: var(--tao-motion-duration-fast);
806
809
  animation-timing-function: var(--tao-motion-ease-out-quint);
807
810
  }
@@ -314,6 +314,9 @@
314
314
  --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
315
315
  --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
316
316
  --tao-motion-unit: .1s;
317
+ --tao-z-index-drawer: 1000;
318
+ --tao-z-index-modal: 1000;
319
+ --tao-z-index-popup: 1100;
317
320
  --tao-primary: var(--tao-color-primary);
318
321
  --tao-primary-hover: var(--tao-color-primary);
319
322
  }
@@ -792,7 +795,7 @@
792
795
  }
793
796
 
794
797
  [data-tao-modal-overlay] {
795
- z-index: 1000;
798
+ z-index: var(--tao-z-index-modal);
796
799
  animation: tao-modal-fade-in var(--tao-motion-duration-mid) ease-out;
797
800
  background: oklch(0% 0 0 / .1);
798
801
  position: fixed;
@@ -816,7 +819,7 @@
816
819
  }
817
820
 
818
821
  [data-tao-modal-wrap] {
819
- z-index: 1001;
822
+ z-index: calc(var(--tao-z-index-modal) + 1);
820
823
  padding: 100px var(--tao-padding-lg) var(--tao-padding-lg);
821
824
  justify-content: center;
822
825
  align-items: flex-start;
@@ -1,12 +1,13 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useEffect, useRef } from "react";
4
+ import { TaoPortalScope } from "../../provider/tao-provider.js";
4
5
  import { cx } from "../../utils/semantic.js";
5
6
  import { Button } from "../button/button.js";
6
7
  import "./modal.css";
7
8
  import * as __rspack_external__radix_ui_react_dialog_6b867f3d from "@radix-ui/react-dialog";
8
9
  function Modal(t0) {
9
- const $ = c(85);
10
+ const $ = c(87);
10
11
  const { open, onClose, title, footer, onOk, okText: t1, cancelText: t2, confirmLoading, okButtonProps, cancelButtonProps, width: t3, centered: t4, closable: t5, maskClosable: t6, keyboard: t7, afterClose, destroyOnHidden: t8, children, classNames, styles: stylesProp } = t0;
11
12
  const okText = void 0 === t1 ? "OK" : t1;
12
13
  const cancelText = void 0 === t2 ? "Cancel" : t2;
@@ -302,32 +303,40 @@ function Modal(t0) {
302
303
  $[76] = t38;
303
304
  } else t38 = $[76];
304
305
  let t39;
305
- if ($[77] !== forceMount || $[78] !== t23 || $[79] !== t38) {
306
- t39 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_6b867f3d.Portal, {
307
- forceMount: forceMount,
306
+ if ($[77] !== t23 || $[78] !== t38) {
307
+ t39 = /*#__PURE__*/ jsxs(TaoPortalScope, {
308
308
  children: [
309
309
  t23,
310
310
  t38
311
311
  ]
312
312
  });
313
- $[77] = forceMount;
314
- $[78] = t23;
315
- $[79] = t38;
316
- $[80] = t39;
317
- } else t39 = $[80];
313
+ $[77] = t23;
314
+ $[78] = t38;
315
+ $[79] = t39;
316
+ } else t39 = $[79];
318
317
  let t40;
319
- if ($[81] !== open || $[82] !== t19 || $[83] !== t39) {
320
- t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_6b867f3d.Root, {
318
+ if ($[80] !== forceMount || $[81] !== t39) {
319
+ t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_6b867f3d.Portal, {
320
+ forceMount: forceMount,
321
+ children: t39
322
+ });
323
+ $[80] = forceMount;
324
+ $[81] = t39;
325
+ $[82] = t40;
326
+ } else t40 = $[82];
327
+ let t41;
328
+ if ($[83] !== open || $[84] !== t19 || $[85] !== t40) {
329
+ t41 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_6b867f3d.Root, {
321
330
  open: open,
322
331
  onOpenChange: t19,
323
- children: t39
332
+ children: t40
324
333
  });
325
- $[81] = open;
326
- $[82] = t19;
327
- $[83] = t39;
328
- $[84] = t40;
329
- } else t40 = $[84];
330
- return t40;
334
+ $[83] = open;
335
+ $[84] = t19;
336
+ $[85] = t40;
337
+ $[86] = t41;
338
+ } else t41 = $[86];
339
+ return t41;
331
340
  }
332
341
  function CloseIcon() {
333
342
  const $ = c(1);