antd-solid 0.0.27 → 0.0.30

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/index.esm.js CHANGED
@@ -7,6 +7,7 @@ import { generate } from '@ant-design/colors';
7
7
  import { isNil, omit, isNumber, clamp, floor, compact, isEqual, pick, isUndefined, isEmpty, last, uniq, get, pull, cloneDeep, max, set, unset, inRange as inRange$1, remove } from 'lodash-es';
8
8
  import NP from 'number-precision';
9
9
  import { Transition, TransitionGroup } from 'solid-transition-group';
10
+ import dayjs from 'dayjs';
10
11
  import { createStore, produce } from 'solid-js/store';
11
12
 
12
13
  function styleInject(css, ref) {
@@ -438,6 +439,7 @@ function createCssVariables(token, theme = 'light') {
438
439
  '--ant-tree-node-wrapper-padding': '2px 0',
439
440
  '--ant-tree-node-selected-bg': aliasToken.controlItemBgActive,
440
441
  '--ant-tree-node-hover-bg': aliasToken.controlItemBgHover,
442
+ '--ant-date-picker-cell-hover-bg': aliasToken.controlItemBgHover,
441
443
  '--ant-alert-default-padding': '8px 12px',
442
444
  '--ant-tabs-card-bg': aliasToken.colorFillAlter,
443
445
  '--ant-progress-remaining-color': mapToken.colorFillSecondary,
@@ -487,6 +489,21 @@ const locale$1 = {
487
489
  Modal: {
488
490
  okText: '确定',
489
491
  cancelText: '取消'
492
+ },
493
+ Popconfirm: {
494
+ okText: '确定',
495
+ cancelText: '取消'
496
+ },
497
+ DatePicker: {
498
+ placeholder: '请输入日期',
499
+ today: '今天',
500
+ Mon: '一',
501
+ Tue: '二',
502
+ Wed: '三',
503
+ Thu: '四',
504
+ Fri: '五',
505
+ Sat: '六',
506
+ Sun: '日'
490
507
  }
491
508
  };
492
509
 
@@ -574,9 +591,9 @@ const CompactContext = createContext({
574
591
  compact: false
575
592
  });
576
593
 
577
- var _tmpl$$O = /*#__PURE__*/template(`<span class="i-ant-design:loading [vertical-align:-0.125em] keyframes-spin [animation:spin_1s_linear_infinite]">`),
578
- _tmpl$2$v = /*#__PURE__*/template(`<span>`),
579
- _tmpl$3$k = /*#__PURE__*/template(`<span class="inline-block leading-inherit">`);
594
+ var _tmpl$$Q = /*#__PURE__*/template(`<span class="i-ant-design:loading [vertical-align:-0.125em] keyframes-spin [animation:spin_1s_linear_infinite]">`),
595
+ _tmpl$2$w = /*#__PURE__*/template(`<span>`),
596
+ _tmpl$3$l = /*#__PURE__*/template(`<span class="inline-block leading-inherit">`);
580
597
  const sizeClassMap = {
581
598
  large: 'px-15px py-7px h-40px leading-24px',
582
599
  middle: 'px-15px py-4px h-32px leading-22px',
@@ -652,21 +669,21 @@ const Button$1 = _props => {
652
669
  return resolvedIcon();
653
670
  },
654
671
  get children() {
655
- var _el$3 = _tmpl$3$k();
672
+ var _el$3 = _tmpl$3$l();
656
673
  insert(_el$3, resolvedIcon);
657
674
  return _el$3;
658
675
  }
659
676
  });
660
677
  },
661
678
  get children() {
662
- return _tmpl$$O();
679
+ return _tmpl$$Q();
663
680
  }
664
681
  }), createComponent(Show, {
665
682
  get when() {
666
683
  return memo(() => !!resolvedChildren())() && !(props.hideChildrenWhenLoading && loading());
667
684
  },
668
685
  get children() {
669
- var _el$2 = _tmpl$2$v();
686
+ var _el$2 = _tmpl$2$w();
670
687
  spread(_el$2, mergeProps$1(() => props.contentHTMLAttributes, {
671
688
  get ["class"]() {
672
689
  return cs('inline-block leading-inherit', props.contentHTMLAttributes?.class);
@@ -738,7 +755,7 @@ function useFocus(target) {
738
755
  return hover;
739
756
  }
740
757
 
741
- var _tmpl$$N = /*#__PURE__*/template(`<textarea>`);
758
+ var _tmpl$$P = /*#__PURE__*/template(`<textarea>`);
742
759
  const TextArea = props => {
743
760
  const size = useComponentSize(() => props.size);
744
761
  const [_, inputProps] = splitProps(props, ['defaultValue', 'value', 'onChange', 'onPressEnter', 'onKeyDown', 'size', 'autoFocus', 'status']);
@@ -753,6 +770,7 @@ const TextArea = props => {
753
770
  const [value, setValue] = createControllableValue(props, {
754
771
  trigger: null
755
772
  });
773
+ let isComposition = false;
756
774
  return createComponent(Element$1, {
757
775
  get ["class"]() {
758
776
  return cs(props.rootClass, 'flex');
@@ -773,7 +791,7 @@ const TextArea = props => {
773
791
  };
774
792
  },
775
793
  get children() {
776
- var _el$ = _tmpl$$N();
794
+ var _el$ = _tmpl$$P();
777
795
  use(el => {
778
796
  setRef(props, el);
779
797
  inputRef = el;
@@ -799,8 +817,14 @@ const TextArea = props => {
799
817
  }
800
818
  }
801
819
  },
820
+ "onCompositionStart": () => {
821
+ isComposition = true;
822
+ },
823
+ "onCompositionEnd": () => {
824
+ isComposition = false;
825
+ },
802
826
  "onKeyDown": e => {
803
- if (e.key === 'Enter') {
827
+ if (e.key === 'Enter' && !isComposition) {
804
828
  props.onPressEnter?.(e);
805
829
  }
806
830
  props.onKeyDown?.(e);
@@ -814,10 +838,10 @@ const TextArea = props => {
814
838
  var css_248z$4 = ".ant-input-group > :first-child {\n border-top-left-radius: var(--ant-input-border-radius);\n border-bottom-left-radius: var(--ant-input-border-radius);\n}\n.ant-input-group > :last-child {\n border-top-right-radius: var(--ant-input-border-radius);\n border-bottom-right-radius: var(--ant-input-border-radius);\n}\n\n.ant-compact > :not(:first-child).ant-input-group.ant-compact-item > :first-child, .ant-compact > :not(:first-child) .ant-input-group.ant-compact-item > :first-child {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n}\n.ant-compact > :not(:last-child).ant-input-group.ant-compact-item > :last-child, .ant-compact > :not(:last-child) .ant-input-group.ant-compact-item > :last-child {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n}";
815
839
  styleInject(css_248z$4);
816
840
 
817
- var _tmpl$$M = /*#__PURE__*/template(`<div>`),
818
- _tmpl$2$u = /*#__PURE__*/template(`<span class="ml-4px i-ant-design:close-circle-filled cursor-pointer text-[var(--ant-color-text-quaternary)] hover:text-[var(--ant-color-text-tertiary)] active:text-[var(--ant-color-text)]">`),
819
- _tmpl$3$j = /*#__PURE__*/template(`<div class="[display:var(--actions-display)] absolute top-0 bottom-0 right-0 h-[calc(100%-2px)] translate-y-1px -translate-x-1px">`),
820
- _tmpl$4$d = /*#__PURE__*/template(`<div><input>`);
841
+ var _tmpl$$O = /*#__PURE__*/template(`<div>`),
842
+ _tmpl$2$v = /*#__PURE__*/template(`<span class="ml-4px i-ant-design:close-circle-filled cursor-pointer text-[var(--ant-color-text-quaternary)] hover:text-[var(--ant-color-text-tertiary)] active:text-[var(--ant-color-text)]">`),
843
+ _tmpl$3$k = /*#__PURE__*/template(`<div class="[display:var(--actions-display)] absolute top-0 bottom-0 right-0 h-[calc(100%-2px)] translate-y-1px -translate-x-1px">`),
844
+ _tmpl$4$e = /*#__PURE__*/template(`<div><input>`);
821
845
  const statusClassDict$1 = {
822
846
  default: (disabled, foucs) => {
823
847
  if (disabled) {
@@ -870,6 +894,7 @@ function CommonInput(props) {
870
894
  const prefix = createMemo(() => props.prefix);
871
895
  const suffix = createMemo(() => props.suffix);
872
896
  const actions = createMemo(() => props.actions);
897
+ let isComposition = false;
873
898
  return createComponent(Element$1, {
874
899
  block: true,
875
900
  get ["class"]() {
@@ -905,7 +930,7 @@ function CommonInput(props) {
905
930
  return !isNil(addonBefore());
906
931
  },
907
932
  get children() {
908
- var _el$ = _tmpl$$M();
933
+ var _el$ = _tmpl$$O();
909
934
  spread(_el$, mergeProps$1(() => props.addonBeforeHTMLAttributes, {
910
935
  get ["class"]() {
911
936
  return cs(props.addonBeforeHTMLAttributes?.class, 'ant-input-addon ant-input-addon-before', 'shrink-0 flex justify-center items-center px-11px bg-[rgba(0,0,0,.02)] [border:1px_solid_var(--ant-color-border)] border-r-0');
@@ -915,7 +940,7 @@ function CommonInput(props) {
915
940
  return _el$;
916
941
  }
917
942
  }), (() => {
918
- var _el$2 = _tmpl$4$d(),
943
+ var _el$2 = _tmpl$4$e(),
919
944
  _el$4 = _el$2.firstChild;
920
945
  spread(_el$2, mergeProps$1(() => props.affixWrapperHTMLAttributes, {
921
946
  get ["class"]() {
@@ -927,7 +952,7 @@ function CommonInput(props) {
927
952
  return !isNil(prefix());
928
953
  },
929
954
  get children() {
930
- var _el$3 = _tmpl$$M();
955
+ var _el$3 = _tmpl$$O();
931
956
  spread(_el$3, mergeProps$1(() => props.prefixHTMLAttributes, {
932
957
  get ["class"]() {
933
958
  return cs(props.prefixHTMLAttributes?.class, 'mr-4px');
@@ -958,8 +983,14 @@ function CommonInput(props) {
958
983
  }
959
984
  }
960
985
  },
986
+ "onCompositionStart": () => {
987
+ isComposition = true;
988
+ },
989
+ "onCompositionEnd": () => {
990
+ isComposition = false;
991
+ },
961
992
  "onKeyDown": e => {
962
- if (e.key === 'Enter') {
993
+ if (e.key === 'Enter' && !isComposition) {
963
994
  props.onPressEnter?.(e);
964
995
  }
965
996
  props.onKeyDown?.(e);
@@ -970,7 +1001,7 @@ function CommonInput(props) {
970
1001
  return showClearBtn();
971
1002
  },
972
1003
  get children() {
973
- var _el$5 = _tmpl$2$u();
1004
+ var _el$5 = _tmpl$2$v();
974
1005
  _el$5.$$click = e => {
975
1006
  e.stopPropagation();
976
1007
  inputRef.value = '';
@@ -988,7 +1019,7 @@ function CommonInput(props) {
988
1019
  return !isNil(suffix());
989
1020
  },
990
1021
  get children() {
991
- var _el$6 = _tmpl$$M();
1022
+ var _el$6 = _tmpl$$O();
992
1023
  spread(_el$6, mergeProps$1(() => props.suffixHTMLAttributes, {
993
1024
  get ["class"]() {
994
1025
  return cs(props.suffixHTMLAttributes?.class, 'ml-4px');
@@ -1003,7 +1034,7 @@ function CommonInput(props) {
1003
1034
  return !isNil(actions());
1004
1035
  },
1005
1036
  get children() {
1006
- var _el$7 = _tmpl$3$j();
1037
+ var _el$7 = _tmpl$3$k();
1007
1038
  insert(_el$7, actions);
1008
1039
  return _el$7;
1009
1040
  }
@@ -1014,7 +1045,7 @@ function CommonInput(props) {
1014
1045
  return !isNil(addonAfter());
1015
1046
  },
1016
1047
  get children() {
1017
- var _el$8 = _tmpl$$M();
1048
+ var _el$8 = _tmpl$$O();
1018
1049
  spread(_el$8, mergeProps$1(() => props.addonAfterHTMLAttributes, {
1019
1050
  get ["class"]() {
1020
1051
  return cs(props.addonAfterHTMLAttributes?.class, 'ant-input-addon ant-input-addon-after', 'shrink-0 flex justify-center items-center px-11px bg-[rgba(0,0,0,.02)] [border:1px_solid_var(--ant-color-border)] border-l-0');
@@ -1033,7 +1064,7 @@ const Input = props => {
1033
1064
  Input.TextArea = TextArea;
1034
1065
  delegateEvents(["click"]);
1035
1066
 
1036
- var _tmpl$$L = /*#__PURE__*/template(`<div class="flex flex-col h-full w-[--ant-input-number-handle-width] [border-left:1px_solid_var(--ant-color-border)] bg-[--ant-color-bg-container]"><div class="text-12px flex justify-center items-center h-1/2 cursor-pointer opacity-70 hover:h-100% hover:text-[var(--ant-color-primary)] transition-color transition-height transition-duration-500"><div class=i-ant-design:up-outlined></div></div><div class="[border-top:1px_solid_var(--ant-color-border)] text-12px flex justify-center items-center h-1/2 cursor-pointer opacity-70 hover:h-100% hover:text-[var(--ant-color-primary)] transition-color transition-height transition-duration-500"><div class=i-ant-design:down-outlined>`);
1067
+ var _tmpl$$N = /*#__PURE__*/template(`<div class="flex flex-col h-full w-[--ant-input-number-handle-width] [border-left:1px_solid_var(--ant-color-border)] bg-[--ant-color-bg-container]"><div class="text-12px flex justify-center items-center h-1/2 cursor-pointer opacity-70 hover:h-100% hover:text-[var(--ant-color-primary)] transition-color transition-height transition-duration-500"><div class=i-ant-design:up-outlined></div></div><div class="[border-top:1px_solid_var(--ant-color-border)] text-12px flex justify-center items-center h-1/2 cursor-pointer opacity-70 hover:h-100% hover:text-[var(--ant-color-primary)] transition-color transition-height transition-duration-500"><div class=i-ant-design:down-outlined>`);
1037
1068
  const isEmptyValue = value => isNil(value) || value === '';
1038
1069
  const InputNumber = _props => {
1039
1070
  const props = mergeProps({
@@ -1104,7 +1135,7 @@ const InputNumber = _props => {
1104
1135
  },
1105
1136
  get actions() {
1106
1137
  return memo(() => !!props.controls)() ? (() => {
1107
- var _el$ = _tmpl$$L(),
1138
+ var _el$ = _tmpl$$N(),
1108
1139
  _el$2 = _el$.firstChild,
1109
1140
  _el$3 = _el$2.nextSibling;
1110
1141
  _el$2.$$click = up;
@@ -1147,8 +1178,8 @@ const InputNumber = _props => {
1147
1178
  };
1148
1179
  delegateEvents(["click"]);
1149
1180
 
1150
- var _tmpl$$K = /*#__PURE__*/template(`<div class="flex relative"><div class="w-[10px] h-[10px] border-solid border-width-[3px] border-[var(--ant-color-primary)] bg-white rounded-[50%] mt-[8px]"></div><div class=ml-[8px]>`),
1151
- _tmpl$2$t = /*#__PURE__*/template(`<div class="absolute top-[8px] bottom-[-24px] left-[4px] w-[2px] bg-[rgba(5,5,5,.06)]">`);
1181
+ var _tmpl$$M = /*#__PURE__*/template(`<div class="flex relative"><div class="w-[10px] h-[10px] border-solid border-width-[3px] border-[var(--ant-color-primary)] bg-white rounded-[50%] mt-[8px]"></div><div class=ml-[8px]>`),
1182
+ _tmpl$2$u = /*#__PURE__*/template(`<div class="absolute top-[8px] bottom-[-24px] left-[4px] w-[2px] bg-[rgba(5,5,5,.06)]">`);
1152
1183
  const Timeline = props => {
1153
1184
  return createComponent(Element$1, {
1154
1185
  "class": "flex flex-col gap-[16px]",
@@ -1158,12 +1189,12 @@ const Timeline = props => {
1158
1189
  return props.items;
1159
1190
  },
1160
1191
  children: (item, i) => (() => {
1161
- var _el$ = _tmpl$$K(),
1192
+ var _el$ = _tmpl$$M(),
1162
1193
  _el$2 = _el$.firstChild,
1163
1194
  _el$3 = _el$2.nextSibling;
1164
1195
  insert(_el$, (() => {
1165
1196
  var _c$ = memo(() => i() !== props.items.length - 1);
1166
- return () => _c$() && _tmpl$2$t();
1197
+ return () => _c$() && _tmpl$2$u();
1167
1198
  })(), _el$2);
1168
1199
  insert(_el$3, () => item.children?.());
1169
1200
  return _el$;
@@ -1239,8 +1270,8 @@ function createTransition(target, when, props = {}) {
1239
1270
  }));
1240
1271
  }
1241
1272
 
1242
- var _tmpl$$J = /*#__PURE__*/template(`<div class="flex items-center gap-12px"><span class="i-ant-design:exclamation-circle text-22px text-[var(--ant-color-warning)]">`),
1243
- _tmpl$2$s = /*#__PURE__*/template(`<div class=ml-34px>`);
1273
+ var _tmpl$$L = /*#__PURE__*/template(`<div class="flex items-center gap-12px"><span class="i-ant-design:exclamation-circle text-22px text-[var(--ant-color-warning)]">`),
1274
+ _tmpl$2$t = /*#__PURE__*/template(`<div class=ml-34px>`);
1244
1275
  function useModal() {
1245
1276
  const [open, setOpen] = createSignal(false);
1246
1277
  const [modalProps, setModalProps] = createSignal({});
@@ -1257,7 +1288,7 @@ function useModal() {
1257
1288
  }, modalProps, {
1258
1289
  get title() {
1259
1290
  return (() => {
1260
- var _el$ = _tmpl$$J();
1291
+ var _el$ = _tmpl$$L();
1261
1292
  _el$.firstChild;
1262
1293
  insert(_el$, () => modalProps().title, null);
1263
1294
  return _el$;
@@ -1265,7 +1296,7 @@ function useModal() {
1265
1296
  },
1266
1297
  get children() {
1267
1298
  return (() => {
1268
- var _el$3 = _tmpl$2$s();
1299
+ var _el$3 = _tmpl$2$t();
1269
1300
  insert(_el$3, () => modalProps().children);
1270
1301
  return _el$3;
1271
1302
  })();
@@ -1285,8 +1316,8 @@ function useModal() {
1285
1316
  return [modal, getContextHolder];
1286
1317
  }
1287
1318
 
1288
- var _tmpl$$I = /*#__PURE__*/template(`<div class="flex items-center gap-12px"><span class="i-ant-design:exclamation-circle text-22px text-[var(--ant-color-warning)]">`),
1289
- _tmpl$2$r = /*#__PURE__*/template(`<div class=ml-34px>`);
1319
+ var _tmpl$$K = /*#__PURE__*/template(`<div class="flex items-center gap-12px"><span class="i-ant-design:exclamation-circle text-22px text-[var(--ant-color-warning)]">`),
1320
+ _tmpl$2$s = /*#__PURE__*/template(`<div class=ml-34px>`);
1290
1321
  function warning$1(props) {
1291
1322
  const div = document.createElement('div');
1292
1323
  document.body.appendChild(div);
@@ -1297,7 +1328,7 @@ function warning$1(props) {
1297
1328
  }, props, {
1298
1329
  get title() {
1299
1330
  return (() => {
1300
- var _el$ = _tmpl$$I();
1331
+ var _el$ = _tmpl$$K();
1301
1332
  _el$.firstChild;
1302
1333
  insert(_el$, () => props.title, null);
1303
1334
  return _el$;
@@ -1305,7 +1336,7 @@ function warning$1(props) {
1305
1336
  },
1306
1337
  get children() {
1307
1338
  return (() => {
1308
- var _el$3 = _tmpl$2$r();
1339
+ var _el$3 = _tmpl$2$s();
1309
1340
  insert(_el$3, () => props.children);
1310
1341
  return _el$3;
1311
1342
  })();
@@ -1331,11 +1362,11 @@ function useLocale() {
1331
1362
  return locale;
1332
1363
  }
1333
1364
 
1334
- var _tmpl$$H = /*#__PURE__*/template(`<div aria-label=mask>`),
1335
- _tmpl$2$q = /*#__PURE__*/template(`<span class=i-ant-design:close-outlined>`),
1336
- _tmpl$3$i = /*#__PURE__*/template(`<div class="inline-flex gap-8px">`),
1337
- _tmpl$4$c = /*#__PURE__*/template(`<div class="mt-12px text-right">`),
1338
- _tmpl$5$8 = /*#__PURE__*/template(`<div class="ant-modal-wrap z-1000 fixed inset-0 overflow-auto pointer-events-none"><div><div class="text-[var(--ant-modal-title-color)] text-16px font-600 mb-8px"></div><div class=grow>`);
1365
+ var _tmpl$$J = /*#__PURE__*/template(`<div aria-label=mask>`),
1366
+ _tmpl$2$r = /*#__PURE__*/template(`<span class=i-ant-design:close-outlined>`),
1367
+ _tmpl$3$j = /*#__PURE__*/template(`<div class="inline-flex gap-8px">`),
1368
+ _tmpl$4$d = /*#__PURE__*/template(`<div class="mt-12px text-right">`),
1369
+ _tmpl$5$9 = /*#__PURE__*/template(`<div class="ant-modal-wrap z-1000 fixed inset-0 overflow-auto pointer-events-none"><div><div class="text-[var(--ant-modal-title-color)] text-16px font-600 mb-8px"></div><div class=grow>`);
1339
1370
  // 单位 s
1340
1371
  const transitionDuration = 0.3;
1341
1372
  const Modal = _props => {
@@ -1439,7 +1470,7 @@ const Modal = _props => {
1439
1470
  return props.mask;
1440
1471
  },
1441
1472
  get children() {
1442
- var _el$ = _tmpl$$H();
1473
+ var _el$ = _tmpl$$J();
1443
1474
  _el$.$$click = () => {
1444
1475
  if (props.maskClosable) {
1445
1476
  props.onCancel?.();
@@ -1449,7 +1480,7 @@ const Modal = _props => {
1449
1480
  return _el$;
1450
1481
  }
1451
1482
  }), (() => {
1452
- var _el$2 = _tmpl$5$8(),
1483
+ var _el$2 = _tmpl$5$9(),
1453
1484
  _el$3 = _el$2.firstChild,
1454
1485
  _el$5 = _el$3.firstChild,
1455
1486
  _el$6 = _el$5.nextSibling;
@@ -1470,7 +1501,7 @@ const Modal = _props => {
1470
1501
  props.onCancel?.();
1471
1502
  },
1472
1503
  get children() {
1473
- return _tmpl$2$q();
1504
+ return _tmpl$2$r();
1474
1505
  }
1475
1506
  });
1476
1507
  }
@@ -1482,7 +1513,7 @@ const Modal = _props => {
1482
1513
  return props.footer;
1483
1514
  },
1484
1515
  get children() {
1485
- var _el$7 = _tmpl$4$c();
1516
+ var _el$7 = _tmpl$4$d();
1486
1517
  insert(_el$7, createComponent(Show, {
1487
1518
  get when() {
1488
1519
  return typeof props.footer !== 'function';
@@ -1491,13 +1522,13 @@ const Modal = _props => {
1491
1522
  return memo(() => typeof props.footer === 'function')() && props.footer();
1492
1523
  },
1493
1524
  get children() {
1494
- var _el$8 = _tmpl$3$i();
1525
+ var _el$8 = _tmpl$3$j();
1495
1526
  insert(_el$8, createComponent(Button$1, mergeProps$1({
1496
1527
  onClick: () => {
1497
1528
  props.onCancel?.();
1498
1529
  },
1499
1530
  get children() {
1500
- return locale().Modal?.cancelText;
1531
+ return locale().Modal.cancelText;
1501
1532
  }
1502
1533
  }, () => props.cancelButtonProps)), null);
1503
1534
  insert(_el$8, createComponent(Button$1, mergeProps$1({
@@ -1505,7 +1536,7 @@ const Modal = _props => {
1505
1536
  loading: "auto",
1506
1537
  onClick: async () => await props.onOk?.(),
1507
1538
  get children() {
1508
- return locale().Modal?.okText;
1539
+ return locale().Modal.okText;
1509
1540
  }
1510
1541
  }, () => props.okButtonProps)), null);
1511
1542
  return _el$8;
@@ -1556,11 +1587,11 @@ delegateEvents(["click"]);
1556
1587
  var css_248z$2 = ".ant-drawer-content-right {\n top: 0;\n bottom: 0;\n right: 0;\n}\n\n.ant-drawer-content-left {\n top: 0;\n bottom: 0;\n left: 0;\n}\n\n.ant-drawer-content-top {\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ant-drawer-content-bottom {\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.ant-drawer-fade-enter-active .ant-drawer-mask,\n.ant-drawer-fade-exit-active .ant-drawer-mask {\n transition: opacity 0.3s;\n}\n.ant-drawer-fade-enter-active .ant-drawer-content,\n.ant-drawer-fade-exit-active .ant-drawer-content {\n transition: transform 0.3s;\n}\n\n.ant-drawer-fade-enter .ant-drawer-mask,\n.ant-drawer-fade-exit-to .ant-drawer-mask {\n opacity: 0;\n}\n.ant-drawer-fade-enter .ant-drawer-content-right,\n.ant-drawer-fade-exit-to .ant-drawer-content-right {\n transform: translateX(100%);\n}\n.ant-drawer-fade-enter .ant-drawer-content-left,\n.ant-drawer-fade-exit-to .ant-drawer-content-left {\n transform: translateX(-100%);\n}\n.ant-drawer-fade-enter .ant-drawer-content-top,\n.ant-drawer-fade-exit-to .ant-drawer-content-top {\n transform: translateY(-100%);\n}\n.ant-drawer-fade-enter .ant-drawer-content-bottom,\n.ant-drawer-fade-exit-to .ant-drawer-content-bottom {\n transform: translateY(100%);\n}";
1557
1588
  styleInject(css_248z$2);
1558
1589
 
1559
- var _tmpl$$G = /*#__PURE__*/template(`<div aria-label=mask>`),
1560
- _tmpl$2$p = /*#__PURE__*/template(`<span class=i-ant-design:close-outlined>`),
1561
- _tmpl$3$h = /*#__PURE__*/template(`<div class="w-full text-[var(--ant-color-text)] text-size-[var(--ant-font-size-lg)] [font-weight:var(--ant-font-weight-strong)] leading-[var(--ant-line-height-lg)]">`),
1562
- _tmpl$4$b = /*#__PURE__*/template(`<div class=shrink-0>`),
1563
- _tmpl$5$7 = /*#__PURE__*/template(`<div><div class="px-[var(--ant-padding-lg)] py-[var(--ant-padding)] flex items-center [border-bottom:var(--ant-line-width)_solid_var(--ant-color-split)] empty:hidden"></div><div class="p-[--ant-drawer-body-padding] overflow-auto">`);
1590
+ var _tmpl$$I = /*#__PURE__*/template(`<div aria-label=mask>`),
1591
+ _tmpl$2$q = /*#__PURE__*/template(`<span class=i-ant-design:close-outlined>`),
1592
+ _tmpl$3$i = /*#__PURE__*/template(`<div class="w-full text-[var(--ant-color-text)] text-size-[var(--ant-font-size-lg)] [font-weight:var(--ant-font-weight-strong)] leading-[var(--ant-line-height-lg)]">`),
1593
+ _tmpl$4$c = /*#__PURE__*/template(`<div class=shrink-0>`),
1594
+ _tmpl$5$8 = /*#__PURE__*/template(`<div><div class="px-[var(--ant-padding-lg)] py-[var(--ant-padding)] flex items-center [border-bottom:var(--ant-line-width)_solid_var(--ant-color-split)] empty:hidden"></div><div class="p-[--ant-drawer-body-padding] overflow-auto">`);
1564
1595
  const Drawer = _props => {
1565
1596
  const props = mergeProps({
1566
1597
  size: '378px',
@@ -1656,7 +1687,7 @@ const Drawer = _props => {
1656
1687
  return props.mask;
1657
1688
  },
1658
1689
  get children() {
1659
- var _el$ = _tmpl$$G();
1690
+ var _el$ = _tmpl$$I();
1660
1691
  _el$.$$click = () => {
1661
1692
  if (props.maskClosable) {
1662
1693
  props.onClose?.();
@@ -1666,7 +1697,7 @@ const Drawer = _props => {
1666
1697
  return _el$;
1667
1698
  }
1668
1699
  }), (() => {
1669
- var _el$2 = _tmpl$5$7(),
1700
+ var _el$2 = _tmpl$5$8(),
1670
1701
  _el$3 = _el$2.firstChild,
1671
1702
  _el$7 = _el$3.nextSibling;
1672
1703
  _el$2.$$click = e => {
@@ -1685,7 +1716,7 @@ const Drawer = _props => {
1685
1716
  props.onClose?.();
1686
1717
  },
1687
1718
  get children() {
1688
- return _tmpl$2$p();
1719
+ return _tmpl$2$q();
1689
1720
  }
1690
1721
  });
1691
1722
  }
@@ -1695,7 +1726,7 @@ const Drawer = _props => {
1695
1726
  return title();
1696
1727
  },
1697
1728
  get children() {
1698
- var _el$5 = _tmpl$3$h();
1729
+ var _el$5 = _tmpl$3$i();
1699
1730
  insert(_el$5, title);
1700
1731
  return _el$5;
1701
1732
  }
@@ -1705,7 +1736,7 @@ const Drawer = _props => {
1705
1736
  return extra();
1706
1737
  },
1707
1738
  get children() {
1708
- var _el$6 = _tmpl$4$b();
1739
+ var _el$6 = _tmpl$4$c();
1709
1740
  insert(_el$6, extra);
1710
1741
  return _el$6;
1711
1742
  }
@@ -1846,7 +1877,7 @@ function useHover(target) {
1846
1877
 
1847
1878
  const TooltipContext = createContext();
1848
1879
 
1849
- var _tmpl$$F = /*#__PURE__*/template(`<div>`);
1880
+ var _tmpl$$H = /*#__PURE__*/template(`<div>`);
1850
1881
  const unwrapContent = (content, close) => {
1851
1882
  return typeof content === 'function' ? content(close) : content;
1852
1883
  };
@@ -2279,7 +2310,7 @@ const Tooltip = _props => {
2279
2310
  },
2280
2311
  get children() {
2281
2312
  return [(() => {
2282
- var _el$ = _tmpl$$F();
2313
+ var _el$ = _tmpl$$H();
2283
2314
  spread(_el$, mergeProps$1(() => props.contentHTMLAttributes, {
2284
2315
  get ["class"]() {
2285
2316
  return cs(props.contentHTMLAttributes?.class, 'px-8px py-6px [box-shadow:var(--ant-box-shadow)] rounded-[var(--ant-border-radius-lg)] overflow-auto translate-x-[--inner-translate-x] translate-y-[--inner-translate-y]', props.plain ? 'text-[var(--ant-color-text)] bg-[var(--ant-color-bg-container-tertiary)]' : 'text-[var(--ant-color-text-light-solid)] bg-[var(--ant-color-bg-spotlight)]');
@@ -2297,7 +2328,7 @@ const Tooltip = _props => {
2297
2328
  return props.arrow;
2298
2329
  },
2299
2330
  get children() {
2300
- var _el$2 = _tmpl$$F();
2331
+ var _el$2 = _tmpl$$H();
2301
2332
  effect(_p$ => {
2302
2333
  var _v$ = cs('w-8px h-8px absolute border-transparent [box-shadow:var(--ant-box-shadow)]'),
2303
2334
  _v$2 = {
@@ -2323,7 +2354,247 @@ const Tooltip = _props => {
2323
2354
  })];
2324
2355
  };
2325
2356
 
2326
- var _tmpl$$E = /*#__PURE__*/template(`<span class="i-ant-design:close-circle-filled cursor-pointer text-[var(--ant-color-text-quaternary)] hover:text-[var(--ant-color-text-tertiary)] active:text-[var(--ant-color-text)]">`),
2357
+ var _tmpl$$G = /*#__PURE__*/template(`<div class=w-full>`),
2358
+ _tmpl$2$p = /*#__PURE__*/template(`<span class="right-[--ant-select-input-padding-right] i-ant-design:close-circle-filled cursor-pointer text-[var(--ant-color-text-quaternary)] hover:text-[var(--ant-color-text-tertiary)] active:text-[var(--ant-color-text)]">`),
2359
+ _tmpl$3$h = /*#__PURE__*/template(`<div tabindex=0><div>`),
2360
+ _tmpl$4$b = /*#__PURE__*/template(`<div class="w-[--ant-select-popup-match-width] max-h-400px overflow-auto [font-size:var(--ant-select-popup-font-size)]">`),
2361
+ _tmpl$5$7 = /*#__PURE__*/template(`<span class="inline-block w-0"> `),
2362
+ _tmpl$6$3 = /*#__PURE__*/template(`<span class="block w-full h-[calc(var(--ant-select-input-height)-2px)] leading-[calc(var(--ant-select-input-height)-2px)] text-[var(--ant-color-text-placeholder)] ellipsis">`),
2363
+ _tmpl$7$1 = /*#__PURE__*/template(`<div class="w-full h-[calc(var(--ant-select-input-height)-2px)] leading-[calc(var(--ant-select-input-height)-2px)] ellipsis">`),
2364
+ _tmpl$8 = /*#__PURE__*/template(`<span class="inline-block my-2px mr-4px bg-[var(--ant-select-multiple-item-bg)] leading-[var(--ant-select-multiple-item-height)] h-[var(--ant-select-multiple-item-height)] pl-8px pr-4px rounded-[var(--ant-border-radius-sm)]"><span class="i-ant-design:close-outlined text-[var(--ant-color-icon)] hover:text-[var(--ant-color-icon-hover)] text-12px cursor-pointer">`),
2365
+ _tmpl$9 = /*#__PURE__*/template(`<span class="i-ant-design:down-outlined text-[var(--ant-color-text-quaternary)] text-12px">`);
2366
+ function SelectInput(_props) {
2367
+ let select;
2368
+ let tooltipContent;
2369
+ const {
2370
+ compact: isCompact
2371
+ } = useContext(CompactContext);
2372
+ const props = mergeProps({
2373
+ variant: 'outlined',
2374
+ placement: 'bottomLeft'
2375
+ }, _props);
2376
+ const size = useComponentSize(() => props.size);
2377
+ const [value, setValue] = createControllableValue(props, {
2378
+ defaultValue: []
2379
+ });
2380
+ const valueArr = createMemo(() => {
2381
+ const _value = value();
2382
+ if (isNil(_value)) return [];
2383
+ return Array.isArray(_value) ? _value : [_value];
2384
+ });
2385
+ const [open, setOpen] = createControllableValue(_props, {
2386
+ defaultValue: false,
2387
+ defaultValuePropName: 'defaultOpen',
2388
+ valuePropName: 'open',
2389
+ trigger: 'onOpenChange'
2390
+ });
2391
+ useClickAway(() => setOpen(false), () => compact([select, tooltipContent]));
2392
+ const [popupMatchWidth, setPopupMatchWidth] = createSignal(0);
2393
+ const [hover, setHover] = createSignal(false);
2394
+ const showClearBtn = createMemo(() => props.allowClear && hover() && valueArr().length > 0);
2395
+ const optionLabelRender = v => props.labelRender ? props.labelRender(v) : String(v);
2396
+ const style$1 = createMemo(() => ({
2397
+ '--ant-select-input-font-size': {
2398
+ small: 'var(--ant-font-size)',
2399
+ middle: 'var(--ant-font-size)',
2400
+ large: 'var(--ant-font-size-lg)'
2401
+ }[size()],
2402
+ '--ant-select-input-padding-right': {
2403
+ small: '7px',
2404
+ middle: '11px',
2405
+ large: '11px'
2406
+ }[size()],
2407
+ '--ant-select-input-padding-left': valueArr().length && props.multiple ? '4px' : 'var(--ant-select-input-padding-right)',
2408
+ '--ant-select-input-padding': '0 var(--ant-select-input-padding-right) 0 var(--ant-select-input-padding-left)',
2409
+ '--ant-select-input-addon-after-padding': '0 0 0 var(--ant-padding-xs)',
2410
+ '--ant-select-popup-match-width': `${popupMatchWidth()}px`,
2411
+ '--ant-select-popup-font-size': {
2412
+ small: 'var(--ant-font-size)',
2413
+ middle: 'var(--ant-font-size)',
2414
+ large: 'var(--ant-font-size-lg)'
2415
+ }[size()],
2416
+ ...props.style
2417
+ }));
2418
+ return createComponent(Element$1, {
2419
+ ref: el => {
2420
+ setRef(props, el);
2421
+ select = el;
2422
+ },
2423
+ get ["class"]() {
2424
+ return cs('!p[.ant-input-addon]:my--1px !p[.ant-input-addon]:mx--12px', 'rounded-6px cursor-pointer inline-block text-[var(--ant-color-text)] leading-[var(--ant-line-height)]', isCompact && 'ant-compact-item', props.class, props.disabled && 'cursor-not-allowed');
2425
+ },
2426
+ get style() {
2427
+ return style$1();
2428
+ },
2429
+ get children() {
2430
+ return createComponent(Tooltip, {
2431
+ plain: true,
2432
+ get open() {
2433
+ return open();
2434
+ },
2435
+ onOpenChange: setOpen,
2436
+ trigger: false,
2437
+ get placement() {
2438
+ return props.placement;
2439
+ },
2440
+ arrow: false,
2441
+ contentHTMLAttributes: {
2442
+ class: 'ant-select-dropdown',
2443
+ style: {
2444
+ padding: 0
2445
+ }
2446
+ },
2447
+ content: () => (() => {
2448
+ var _el$5 = _tmpl$4$b();
2449
+ var _ref$ = tooltipContent;
2450
+ typeof _ref$ === "function" ? use(_ref$, _el$5) : tooltipContent = _el$5;
2451
+ insert(_el$5, () => props.content(() => setOpen(false)));
2452
+ effect(_$p => style(_el$5, {
2453
+ ...pick(style$1(), ['--ant-select-popup-font-size', '--ant-select-popup-match-width'])
2454
+ }, _$p));
2455
+ return _el$5;
2456
+ })(),
2457
+ get getPopupContainer() {
2458
+ return props.getPopupContainer;
2459
+ },
2460
+ get children() {
2461
+ var _el$ = _tmpl$3$h(),
2462
+ _el$3 = _el$.firstChild;
2463
+ _el$.addEventListener("mouseleave", () => setHover(false));
2464
+ _el$.addEventListener("mouseenter", () => setHover(true));
2465
+ _el$.$$click = e => {
2466
+ setOpen(v => !v);
2467
+ setPopupMatchWidth(e.currentTarget.offsetWidth);
2468
+ e.currentTarget.focus();
2469
+ };
2470
+ insert(_el$, createComponent(Show, {
2471
+ get when() {
2472
+ return valueArr().length;
2473
+ },
2474
+ get fallback() {
2475
+ return (() => {
2476
+ var _el$6 = _tmpl$6$3();
2477
+ insert(_el$6, () => props.placeholder, null);
2478
+ insert(_el$6, createComponent(Show, {
2479
+ get when() {
2480
+ return !props.placeholder;
2481
+ },
2482
+ get children() {
2483
+ return _tmpl$5$7();
2484
+ }
2485
+ }), null);
2486
+ return _el$6;
2487
+ })();
2488
+ },
2489
+ get children() {
2490
+ return createComponent(Show, {
2491
+ get when() {
2492
+ return props.multiple;
2493
+ },
2494
+ get fallback() {
2495
+ return createComponent(Dynamic, {
2496
+ component: () => {
2497
+ const optionLabel = createMemo(() => optionLabelRender(valueArr()[0]));
2498
+ return (() => {
2499
+ var _el$8 = _tmpl$7$1();
2500
+ insert(_el$8, optionLabel);
2501
+ effect(() => setAttribute(_el$8, "title", typeof optionLabel() === 'string' ? optionLabel() : undefined));
2502
+ return _el$8;
2503
+ })();
2504
+ }
2505
+ });
2506
+ },
2507
+ get children() {
2508
+ var _el$2 = _tmpl$$G();
2509
+ insert(_el$2, createComponent(For, {
2510
+ get each() {
2511
+ return valueArr();
2512
+ },
2513
+ children: item => {
2514
+ const optionLabel = createMemo(() => optionLabelRender(valueArr()[0]));
2515
+ return (() => {
2516
+ var _el$9 = _tmpl$8(),
2517
+ _el$10 = _el$9.firstChild;
2518
+ insert(_el$9, optionLabel, _el$10);
2519
+ _el$10.$$click = () => setValue(valueArr().filter(v => v !== item));
2520
+ effect(() => setAttribute(_el$9, "title", typeof optionLabel() === 'string' ? optionLabel() : undefined));
2521
+ return _el$9;
2522
+ })();
2523
+ }
2524
+ }));
2525
+ return _el$2;
2526
+ }
2527
+ });
2528
+ }
2529
+ }), _el$3);
2530
+ insert(_el$3, createComponent(Show, {
2531
+ get when() {
2532
+ return showClearBtn();
2533
+ },
2534
+ get fallback() {
2535
+ return createComponent(Show, {
2536
+ get when() {
2537
+ return isUndefined(props.suffixIcon) || props.suffixIcon === true;
2538
+ },
2539
+ get fallback() {
2540
+ return props.suffixIcon;
2541
+ },
2542
+ get children() {
2543
+ return _tmpl$9();
2544
+ }
2545
+ });
2546
+ },
2547
+ get children() {
2548
+ var _el$4 = _tmpl$2$p();
2549
+ _el$4.$$click = e => {
2550
+ e.stopPropagation();
2551
+ setValue([]);
2552
+ setOpen(false);
2553
+ };
2554
+ return _el$4;
2555
+ }
2556
+ }));
2557
+ effect(_p$ => {
2558
+ var _v$ = cs('p[.ant-input-addon]:border-transparent p[.ant-input-addon]:bg-transparent p[.ant-input-addon]:focus-within:border-transparent p[.ant-input-addon]:hover:border-transparent p[.ant-input-addon]:focus-within:[box-shadow:none]', 'relative h-[--ant-select-input-height] rounded-inherit py-1px flex items-center [font-size:var(--ant-select-input-font-size)] p-[--ant-select-input-padding]', props.disabled && '[pointer-events:none] bg-[var(--ant-color-bg-container-disabled)] color-[var(--ant-color-text-disabled)]', props.variant === 'outlined' && {
2559
+ default: cs('border-1px border-solid border-[--ant-color-border] bg-[--ant-color-bg-container]', !props.disabled && 'hover:border-[var(--ant-color-primary)] focus-within:border-[var(--ant-color-primary)] focus-within:[box-shadow:0_0_0_2px_var(--ant-control-outline)]'),
2560
+ error: cs('border-1px border-solid border-[--ant-color-error] bg-[--ant-color-bg-container]', !props.disabled && 'hover:border-[var(--ant-color-error-border-hover)] focus-within:[box-shadow:0_0_0_2px_rgba(255,38,5,.06)]'),
2561
+ warning: cs('border-1px border-solid border-[--ant-color-warning] bg-[--ant-color-bg-container]', !props.disabled && 'hover:border-[var(--ant-color-warning-border-hover)] focus-within:[box-shadow:0_0_0_2px_rgba(255,215,5,.1)]')
2562
+ }[props.status ?? 'default'], props.variant === 'filled' && {
2563
+ default: cs('bg-[--ant-color-fill-tertiary]', !props.disabled && 'hover:bg-[--ant-color-fill-secondary]'),
2564
+ error: cs('bg-[--ant-color-error-bg]', !props.disabled && 'hover:bg-[--ant-color-error-bg-hover]'),
2565
+ warning: cs('bg-[--ant-color-warning-bg]', !props.disabled && 'hover:bg-[--ant-color-warning-bg-hover]')
2566
+ }[props.status ?? 'default']),
2567
+ _v$2 = {
2568
+ small: '24px',
2569
+ middle: '32px',
2570
+ large: '40px'
2571
+ }[size()],
2572
+ _v$3 = {
2573
+ small: '16px',
2574
+ middle: '24px',
2575
+ large: '32px'
2576
+ }[size()],
2577
+ _v$4 = cs('shrink-0 flex justify-end items-center p-[--ant-select-input-addon-after-padding] empty:hidden');
2578
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2579
+ _v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$.style.setProperty("--ant-select-input-height", _v$2) : _el$.style.removeProperty("--ant-select-input-height"));
2580
+ _v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("--ant-select-multiple-item-height", _v$3) : _el$.style.removeProperty("--ant-select-multiple-item-height"));
2581
+ _v$4 !== _p$.o && className(_el$3, _p$.o = _v$4);
2582
+ return _p$;
2583
+ }, {
2584
+ e: undefined,
2585
+ t: undefined,
2586
+ a: undefined,
2587
+ o: undefined
2588
+ });
2589
+ return _el$;
2590
+ }
2591
+ });
2592
+ }
2593
+ });
2594
+ }
2595
+ delegateEvents(["click"]);
2596
+
2597
+ var _tmpl$$F = /*#__PURE__*/template(`<span class="i-ant-design:close-circle-filled cursor-pointer text-[var(--ant-color-text-quaternary)] hover:text-[var(--ant-color-text-tertiary)] active:text-[var(--ant-color-text)]">`),
2327
2598
  _tmpl$2$o = /*#__PURE__*/template(`<div tabindex=0><div class=truncate></div><span class="i-ant-design:swap-right-outlined w-32px"></span><div class=truncate></div><div aria-label=active-bar class="h-1px bg-[var(--ant-color-primary)] absolute bottom-0 transition-left"></div><div class="absolute top-0 bottom-0 right-11px flex items-center">`),
2328
2599
  _tmpl$3$g = /*#__PURE__*/template(`<div class="w-200px max-h-400px overflow-auto">`),
2329
2600
  _tmpl$4$a = /*#__PURE__*/template(`<input class="h-30px [outline:none] bg-inherit placeholder-text-[var(--ant-color-text-placeholder)]"readonly>`),
@@ -2426,329 +2697,96 @@ function RangeInput(props) {
2426
2697
  var _el$8 = _tmpl$3$g();
2427
2698
  var _ref$4 = tooltipContent;
2428
2699
  typeof _ref$4 === "function" ? use(_ref$4, _el$8) : tooltipContent = _el$8;
2429
- insert(_el$8, () => props.content({
2430
- currentFocusType,
2431
- tempValue,
2432
- setSingleValue
2433
- }));
2434
- effect(() => `${width()}px` != null ? _el$8.style.setProperty("width", `${width()}px`) : _el$8.style.removeProperty("width"));
2435
- return _el$8;
2436
- })(),
2437
- get children() {
2438
- var _el$ = _tmpl$2$o(),
2439
- _el$2 = _el$.firstChild,
2440
- _el$3 = _el$2.nextSibling,
2441
- _el$4 = _el$3.nextSibling,
2442
- _el$5 = _el$4.nextSibling,
2443
- _el$6 = _el$5.nextSibling;
2444
- _el$.addEventListener("mouseleave", () => setHover(false));
2445
- _el$.addEventListener("mouseenter", () => setHover(true));
2446
- _el$.$$click = e => {
2447
- setOpen(true);
2448
- setWidth(e.currentTarget.offsetWidth);
2449
- setCurrentFocusType(e.target !== endDom ? 'start' : 'end');
2450
- };
2451
- var _ref$ = container;
2452
- typeof _ref$ === "function" ? use(_ref$, _el$) : container = _el$;
2453
- var _ref$2 = startDom;
2454
- typeof _ref$2 === "function" ? use(_ref$2, _el$2) : startDom = _el$2;
2455
- insert(_el$2, createComponent(Show, {
2456
- get when() {
2457
- return !isNil(tempValue()[0]);
2458
- },
2459
- get fallback() {
2460
- return (() => {
2461
- var _el$9 = _tmpl$4$a();
2462
- effect(() => setAttribute(_el$9, "placeholder", props.placeholder?.[0]));
2463
- return _el$9;
2464
- })();
2465
- },
2466
- get children() {
2467
- return optionLabelRender(tempValue()[0]);
2468
- }
2469
- }));
2470
- var _ref$3 = endDom;
2471
- typeof _ref$3 === "function" ? use(_ref$3, _el$4) : endDom = _el$4;
2472
- insert(_el$4, createComponent(Show, {
2473
- get when() {
2474
- return !isNil(tempValue()[1]);
2475
- },
2476
- get fallback() {
2477
- return (() => {
2478
- var _el$10 = _tmpl$4$a();
2479
- effect(() => setAttribute(_el$10, "placeholder", props.placeholder?.[1]));
2480
- return _el$10;
2481
- })();
2482
- },
2483
- get children() {
2484
- return optionLabelRender(tempValue()[1]);
2485
- }
2486
- }));
2487
- insert(_el$6, createComponent(Show, {
2488
- get when() {
2489
- return showClearBtn();
2490
- },
2491
- get fallback() {
2492
- return _tmpl$5$6();
2493
- },
2494
- get children() {
2495
- var _el$7 = _tmpl$$E();
2496
- _el$7.$$click = e => {
2497
- e.stopPropagation();
2498
- setValue([]);
2499
- setOpen(false);
2500
- };
2501
- return _el$7;
2502
- }
2503
- }));
2504
- effect(_p$ => {
2505
- var _v$ = cs('relative min-h-32px pr-25px rounded-inherit grid [grid-template-columns:1fr_auto_1fr] items-center', tempValue().length && props.multiple ? 'pl-4px' : 'pl-11px', props.multiple && 'py-1px', props.disabled && '[pointer-events:none] bg-[var(--ant-color-bg-container-disabled)] color-[var(--ant-color-text-disabled)]', statusClassDict[props.status ?? 'default'](!!props.disabled, open())),
2506
- _v$2 = {
2507
- display: open() ? 'block' : 'none',
2508
- ...activeBarStyle()
2509
- };
2510
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2511
- _p$.t = style(_el$5, _v$2, _p$.t);
2512
- return _p$;
2513
- }, {
2514
- e: undefined,
2515
- t: undefined
2516
- });
2517
- return _el$;
2518
- }
2519
- });
2520
- }
2521
- });
2522
- }
2523
- delegateEvents(["click"]);
2524
-
2525
- var _tmpl$$D = /*#__PURE__*/template(`<div class=w-full>`),
2526
- _tmpl$2$n = /*#__PURE__*/template(`<span class="right-[--ant-select-input-padding-right] i-ant-design:close-circle-filled cursor-pointer text-[var(--ant-color-text-quaternary)] hover:text-[var(--ant-color-text-tertiary)] active:text-[var(--ant-color-text)]">`),
2527
- _tmpl$3$f = /*#__PURE__*/template(`<div tabindex=0><div>`),
2528
- _tmpl$4$9 = /*#__PURE__*/template(`<div class="w-[--ant-select-popup-match-width] max-h-400px overflow-auto [font-size:var(--ant-select-popup-font-size)]">`),
2529
- _tmpl$5$5 = /*#__PURE__*/template(`<span class="inline-block w-0"> `),
2530
- _tmpl$6$2 = /*#__PURE__*/template(`<span class="block w-full h-[calc(var(--ant-select-input-height)-2px)] leading-[calc(var(--ant-select-input-height)-2px)] text-[var(--ant-color-text-placeholder)] ellipsis">`),
2531
- _tmpl$7$1 = /*#__PURE__*/template(`<div class="w-full h-[calc(var(--ant-select-input-height)-2px)] leading-[calc(var(--ant-select-input-height)-2px)] ellipsis">`),
2532
- _tmpl$8 = /*#__PURE__*/template(`<span class="inline-block my-2px mr-4px bg-[var(--ant-select-multiple-item-bg)] leading-[var(--ant-select-multiple-item-height)] h-[var(--ant-select-multiple-item-height)] pl-8px pr-4px rounded-[var(--ant-border-radius-sm)]"><span class="i-ant-design:close-outlined text-[var(--ant-color-icon)] hover:text-[var(--ant-color-icon-hover)] text-12px cursor-pointer">`),
2533
- _tmpl$9 = /*#__PURE__*/template(`<span class="i-ant-design:down-outlined text-[var(--ant-color-text-quaternary)] text-12px">`);
2534
- function SelectInput(_props) {
2535
- let select;
2536
- let tooltipContent;
2537
- const {
2538
- compact: isCompact
2539
- } = useContext(CompactContext);
2540
- const props = mergeProps({
2541
- variant: 'outlined',
2542
- placement: 'bottomLeft'
2543
- }, _props);
2544
- const size = useComponentSize(() => props.size);
2545
- const [value, setValue] = createControllableValue(props, {
2546
- defaultValue: []
2547
- });
2548
- const valueArr = createMemo(() => value() ?? []);
2549
- const [open, setOpen] = createControllableValue(_props, {
2550
- defaultValue: false,
2551
- defaultValuePropName: 'defaultOpen',
2552
- valuePropName: 'open',
2553
- trigger: 'onOpenChange'
2554
- });
2555
- useClickAway(() => setOpen(false), () => compact([select, tooltipContent]));
2556
- const [popupMatchWidth, setPopupMatchWidth] = createSignal(0);
2557
- const [hover, setHover] = createSignal(false);
2558
- const showClearBtn = createMemo(() => props.allowClear && hover() && valueArr().length > 0);
2559
- const optionLabelRender = v => props.labelRender ? props.labelRender(v) : String(v);
2560
- const style$1 = createMemo(() => ({
2561
- '--ant-select-input-font-size': {
2562
- small: 'var(--ant-font-size)',
2563
- middle: 'var(--ant-font-size)',
2564
- large: 'var(--ant-font-size-lg)'
2565
- }[size()],
2566
- '--ant-select-input-padding-right': {
2567
- small: '7px',
2568
- middle: '11px',
2569
- large: '11px'
2570
- }[size()],
2571
- '--ant-select-input-padding-left': valueArr().length && props.multiple ? '4px' : 'var(--ant-select-input-padding-right)',
2572
- '--ant-select-input-padding': '0 var(--ant-select-input-padding-right) 0 var(--ant-select-input-padding-left)',
2573
- '--ant-select-input-addon-after-padding': '0 0 0 var(--ant-padding-xs)',
2574
- '--ant-select-popup-match-width': `${popupMatchWidth()}px`,
2575
- '--ant-select-popup-font-size': {
2576
- small: 'var(--ant-font-size)',
2577
- middle: 'var(--ant-font-size)',
2578
- large: 'var(--ant-font-size-lg)'
2579
- }[size()],
2580
- ...props.style
2581
- }));
2582
- return createComponent(Element$1, {
2583
- ref: el => {
2584
- setRef(props, el);
2585
- select = el;
2586
- },
2587
- get ["class"]() {
2588
- return cs('!p[.ant-input-addon]:my--1px !p[.ant-input-addon]:mx--12px', 'rounded-6px cursor-pointer inline-block text-[var(--ant-color-text)] leading-[var(--ant-line-height)]', isCompact && 'ant-compact-item', props.class, props.disabled && 'cursor-not-allowed');
2589
- },
2590
- get style() {
2591
- return style$1();
2592
- },
2593
- get children() {
2594
- return createComponent(Tooltip, {
2595
- plain: true,
2596
- get open() {
2597
- return open();
2598
- },
2599
- onOpenChange: setOpen,
2600
- trigger: false,
2601
- get placement() {
2602
- return props.placement;
2603
- },
2604
- arrow: false,
2605
- contentHTMLAttributes: {
2606
- class: 'ant-select-dropdown',
2607
- style: {
2608
- padding: 0
2609
- }
2610
- },
2611
- content: () => (() => {
2612
- var _el$5 = _tmpl$4$9();
2613
- var _ref$ = tooltipContent;
2614
- typeof _ref$ === "function" ? use(_ref$, _el$5) : tooltipContent = _el$5;
2615
- insert(_el$5, () => props.content(() => setOpen(false)));
2616
- effect(_$p => style(_el$5, {
2617
- ...pick(style$1(), ['--ant-select-popup-font-size', '--ant-select-popup-match-width'])
2700
+ insert(_el$8, () => props.content({
2701
+ currentFocusType,
2702
+ tempValue,
2703
+ setSingleValue
2704
+ }));
2705
+ effect(_$p => style(_el$8, {
2706
+ width: `${width()}px`,
2707
+ ...props.tooltipContentStyle
2618
2708
  }, _$p));
2619
- return _el$5;
2709
+ return _el$8;
2620
2710
  })(),
2621
- get getPopupContainer() {
2622
- return props.getPopupContainer;
2623
- },
2624
2711
  get children() {
2625
- var _el$ = _tmpl$3$f(),
2626
- _el$3 = _el$.firstChild;
2712
+ var _el$ = _tmpl$2$o(),
2713
+ _el$2 = _el$.firstChild,
2714
+ _el$3 = _el$2.nextSibling,
2715
+ _el$4 = _el$3.nextSibling,
2716
+ _el$5 = _el$4.nextSibling,
2717
+ _el$6 = _el$5.nextSibling;
2627
2718
  _el$.addEventListener("mouseleave", () => setHover(false));
2628
2719
  _el$.addEventListener("mouseenter", () => setHover(true));
2629
2720
  _el$.$$click = e => {
2630
- setOpen(v => !v);
2631
- setPopupMatchWidth(e.currentTarget.offsetWidth);
2632
- e.currentTarget.focus();
2721
+ setOpen(true);
2722
+ setWidth(e.currentTarget.offsetWidth);
2723
+ setCurrentFocusType(e.target !== endDom ? 'start' : 'end');
2633
2724
  };
2634
- insert(_el$, createComponent(Show, {
2725
+ var _ref$ = container;
2726
+ typeof _ref$ === "function" ? use(_ref$, _el$) : container = _el$;
2727
+ var _ref$2 = startDom;
2728
+ typeof _ref$2 === "function" ? use(_ref$2, _el$2) : startDom = _el$2;
2729
+ insert(_el$2, createComponent(Show, {
2635
2730
  get when() {
2636
- return valueArr().length;
2731
+ return !isNil(tempValue()[0]);
2637
2732
  },
2638
2733
  get fallback() {
2639
2734
  return (() => {
2640
- var _el$6 = _tmpl$6$2();
2641
- insert(_el$6, () => props.placeholder, null);
2642
- insert(_el$6, createComponent(Show, {
2643
- get when() {
2644
- return !props.placeholder;
2645
- },
2646
- get children() {
2647
- return _tmpl$5$5();
2648
- }
2649
- }), null);
2650
- return _el$6;
2735
+ var _el$9 = _tmpl$4$a();
2736
+ effect(() => setAttribute(_el$9, "placeholder", props.placeholder?.[0]));
2737
+ return _el$9;
2651
2738
  })();
2652
2739
  },
2653
2740
  get children() {
2654
- return createComponent(Show, {
2655
- get when() {
2656
- return props.multiple;
2657
- },
2658
- get fallback() {
2659
- return createComponent(Dynamic, {
2660
- component: () => {
2661
- const optionLabel = createMemo(() => optionLabelRender(valueArr()[0]));
2662
- return (() => {
2663
- var _el$8 = _tmpl$7$1();
2664
- insert(_el$8, optionLabel);
2665
- effect(() => setAttribute(_el$8, "title", typeof optionLabel() === 'string' ? optionLabel() : undefined));
2666
- return _el$8;
2667
- })();
2668
- }
2669
- });
2670
- },
2671
- get children() {
2672
- var _el$2 = _tmpl$$D();
2673
- insert(_el$2, createComponent(For, {
2674
- get each() {
2675
- return valueArr();
2676
- },
2677
- children: item => {
2678
- const optionLabel = createMemo(() => optionLabelRender(valueArr()[0]));
2679
- return (() => {
2680
- var _el$9 = _tmpl$8(),
2681
- _el$10 = _el$9.firstChild;
2682
- insert(_el$9, optionLabel, _el$10);
2683
- _el$10.$$click = () => setValue(valueArr().filter(v => v !== item));
2684
- effect(() => setAttribute(_el$9, "title", typeof optionLabel() === 'string' ? optionLabel() : undefined));
2685
- return _el$9;
2686
- })();
2687
- }
2688
- }));
2689
- return _el$2;
2690
- }
2691
- });
2741
+ return optionLabelRender(tempValue()[0]);
2692
2742
  }
2693
- }), _el$3);
2694
- insert(_el$3, createComponent(Show, {
2743
+ }));
2744
+ var _ref$3 = endDom;
2745
+ typeof _ref$3 === "function" ? use(_ref$3, _el$4) : endDom = _el$4;
2746
+ insert(_el$4, createComponent(Show, {
2747
+ get when() {
2748
+ return !isNil(tempValue()[1]);
2749
+ },
2750
+ get fallback() {
2751
+ return (() => {
2752
+ var _el$10 = _tmpl$4$a();
2753
+ effect(() => setAttribute(_el$10, "placeholder", props.placeholder?.[1]));
2754
+ return _el$10;
2755
+ })();
2756
+ },
2757
+ get children() {
2758
+ return optionLabelRender(tempValue()[1]);
2759
+ }
2760
+ }));
2761
+ insert(_el$6, createComponent(Show, {
2695
2762
  get when() {
2696
2763
  return showClearBtn();
2697
2764
  },
2698
2765
  get fallback() {
2699
- return createComponent(Show, {
2700
- get when() {
2701
- return isUndefined(props.suffixIcon) || props.suffixIcon === true;
2702
- },
2703
- get fallback() {
2704
- return props.suffixIcon;
2705
- },
2706
- get children() {
2707
- return _tmpl$9();
2708
- }
2709
- });
2766
+ return _tmpl$5$6();
2710
2767
  },
2711
2768
  get children() {
2712
- var _el$4 = _tmpl$2$n();
2713
- _el$4.$$click = e => {
2769
+ var _el$7 = _tmpl$$F();
2770
+ _el$7.$$click = e => {
2714
2771
  e.stopPropagation();
2715
2772
  setValue([]);
2716
2773
  setOpen(false);
2717
2774
  };
2718
- return _el$4;
2775
+ return _el$7;
2719
2776
  }
2720
2777
  }));
2721
2778
  effect(_p$ => {
2722
- var _v$ = cs('p[.ant-input-addon]:border-transparent p[.ant-input-addon]:bg-transparent p[.ant-input-addon]:focus-within:border-transparent p[.ant-input-addon]:hover:border-transparent p[.ant-input-addon]:focus-within:[box-shadow:none]', 'relative h-[--ant-select-input-height] rounded-inherit py-1px flex items-center [font-size:var(--ant-select-input-font-size)] p-[--ant-select-input-padding]', props.disabled && '[pointer-events:none] bg-[var(--ant-color-bg-container-disabled)] color-[var(--ant-color-text-disabled)]', props.variant === 'outlined' && {
2723
- default: cs('border-1px border-solid border-[--ant-color-border] bg-[--ant-color-bg-container]', !props.disabled && 'hover:border-[var(--ant-color-primary)] focus-within:border-[var(--ant-color-primary)] focus-within:[box-shadow:0_0_0_2px_var(--ant-control-outline)]'),
2724
- error: cs('border-1px border-solid border-[--ant-color-error] bg-[--ant-color-bg-container]', !props.disabled && 'hover:border-[var(--ant-color-error-border-hover)] focus-within:[box-shadow:0_0_0_2px_rgba(255,38,5,.06)]'),
2725
- warning: cs('border-1px border-solid border-[--ant-color-warning] bg-[--ant-color-bg-container]', !props.disabled && 'hover:border-[var(--ant-color-warning-border-hover)] focus-within:[box-shadow:0_0_0_2px_rgba(255,215,5,.1)]')
2726
- }[props.status ?? 'default'], props.variant === 'filled' && {
2727
- default: cs('bg-[--ant-color-fill-tertiary]', !props.disabled && 'hover:bg-[--ant-color-fill-secondary]'),
2728
- error: cs('bg-[--ant-color-error-bg]', !props.disabled && 'hover:bg-[--ant-color-error-bg-hover]'),
2729
- warning: cs('bg-[--ant-color-warning-bg]', !props.disabled && 'hover:bg-[--ant-color-warning-bg-hover]')
2730
- }[props.status ?? 'default']),
2779
+ var _v$ = cs('relative min-h-32px pr-25px rounded-inherit grid [grid-template-columns:1fr_auto_1fr] items-center', tempValue().length && props.multiple ? 'pl-4px' : 'pl-11px', props.multiple && 'py-1px', props.disabled && '[pointer-events:none] bg-[var(--ant-color-bg-container-disabled)] color-[var(--ant-color-text-disabled)]', statusClassDict[props.status ?? 'default'](!!props.disabled, open())),
2731
2780
  _v$2 = {
2732
- small: '24px',
2733
- middle: '32px',
2734
- large: '40px'
2735
- }[size()],
2736
- _v$3 = {
2737
- small: '16px',
2738
- middle: '24px',
2739
- large: '32px'
2740
- }[size()],
2741
- _v$4 = cs('shrink-0 flex justify-end items-center p-[--ant-select-input-addon-after-padding] empty:hidden');
2781
+ display: open() ? 'block' : 'none',
2782
+ ...activeBarStyle()
2783
+ };
2742
2784
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2743
- _v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$.style.setProperty("--ant-select-input-height", _v$2) : _el$.style.removeProperty("--ant-select-input-height"));
2744
- _v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("--ant-select-multiple-item-height", _v$3) : _el$.style.removeProperty("--ant-select-multiple-item-height"));
2745
- _v$4 !== _p$.o && className(_el$3, _p$.o = _v$4);
2785
+ _p$.t = style(_el$5, _v$2, _p$.t);
2746
2786
  return _p$;
2747
2787
  }, {
2748
2788
  e: undefined,
2749
- t: undefined,
2750
- a: undefined,
2751
- o: undefined
2789
+ t: undefined
2752
2790
  });
2753
2791
  return _el$;
2754
2792
  }
@@ -2758,6 +2796,250 @@ function SelectInput(_props) {
2758
2796
  }
2759
2797
  delegateEvents(["click"]);
2760
2798
 
2799
+ var _tmpl$$E = /*#__PURE__*/template(`<span class=i-ant-design:left-outlined>`),
2800
+ _tmpl$2$n = /*#__PURE__*/template(`<span class=i-ant-design:right-outlined>`),
2801
+ _tmpl$3$f = /*#__PURE__*/template(`<div><div class="h-40px flex items-center border-0 border-b border-solid border-[--ant-color-border]"><div class="w-full flex justify-center"></div></div><div class=flex>`),
2802
+ _tmpl$4$9 = /*#__PURE__*/template(`<div class=p-[var(--ant-padding-xs)_calc(var(--ant-padding)+.5*var(--ant-padding-xxs))]><table><thead><tr><th class="w-36px h-36px"></th><th class="w-36px h-36px"></th><th class="w-36px h-36px"></th><th class="w-36px h-36px"></th><th class="w-36px h-36px"></th><th class="w-36px h-36px"></th><th class="w-36px h-36px"></th></tr></thead><tbody>`),
2803
+ _tmpl$5$5 = /*#__PURE__*/template(`<tr>`),
2804
+ _tmpl$6$2 = /*#__PURE__*/template(`<td class="w-36px h-36px"><div>`);
2805
+ const monthList = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
2806
+ const Panel = props => {
2807
+ const locale = useLocale();
2808
+ const [value, setValue] = createControllableValue(props);
2809
+ const valueArr = createMemo(() => {
2810
+ const _value = value();
2811
+ if (!_value) return [];
2812
+ return Array.isArray(_value) ? _value : [_value];
2813
+ });
2814
+ const [currentMonth, setCurrentMonth] = createSignal(dayjs().startOf('month'));
2815
+ return (() => {
2816
+ var _el$ = _tmpl$3$f(),
2817
+ _el$2 = _el$.firstChild,
2818
+ _el$4 = _el$2.firstChild,
2819
+ _el$6 = _el$2.nextSibling;
2820
+ insert(_el$2, createComponent(Button$1, {
2821
+ type: "text",
2822
+ onClick: () => {
2823
+ setCurrentMonth(prev => prev.subtract(1, 'M'));
2824
+ },
2825
+ get children() {
2826
+ return _tmpl$$E();
2827
+ }
2828
+ }), _el$4);
2829
+ insert(_el$4, createComponent(Button$1, {
2830
+ type: "text",
2831
+ get children() {
2832
+ return memo(() => locale().locale === 'en')() ? monthList[currentMonth().month()] : `${currentMonth().year()}年`;
2833
+ }
2834
+ }), null);
2835
+ insert(_el$4, createComponent(Button$1, {
2836
+ type: "text",
2837
+ get children() {
2838
+ return memo(() => locale().locale === 'en')() ? currentMonth().year() : `${currentMonth().month() + 1}月`;
2839
+ }
2840
+ }), null);
2841
+ insert(_el$4, createComponent(Show, {
2842
+ get when() {
2843
+ return props.multiple;
2844
+ },
2845
+ get children() {
2846
+ return [createComponent(Button$1, {
2847
+ type: "text",
2848
+ get children() {
2849
+ return `${currentMonth().add(1, 'M').year()}年`;
2850
+ }
2851
+ }), createComponent(Button$1, {
2852
+ type: "text",
2853
+ get children() {
2854
+ return `${currentMonth().add(1, 'M').month() + 1}月`;
2855
+ }
2856
+ })];
2857
+ }
2858
+ }), null);
2859
+ insert(_el$2, createComponent(Button$1, {
2860
+ type: "text",
2861
+ onClick: () => {
2862
+ setCurrentMonth(prev => prev.add(1, 'M'));
2863
+ },
2864
+ get children() {
2865
+ return _tmpl$2$n();
2866
+ }
2867
+ }), null);
2868
+ insert(_el$6, createComponent(Weeks, {
2869
+ get month() {
2870
+ return currentMonth();
2871
+ },
2872
+ get value() {
2873
+ return valueArr();
2874
+ },
2875
+ onChange: date => {
2876
+ if (props.multiple) {
2877
+ setValue([date, valueArr()[1]]);
2878
+ } else {
2879
+ setValue(date);
2880
+ }
2881
+ }
2882
+ }), null);
2883
+ insert(_el$6, createComponent(Show, {
2884
+ get when() {
2885
+ return props.multiple;
2886
+ },
2887
+ get children() {
2888
+ return createComponent(Weeks, {
2889
+ get month() {
2890
+ return currentMonth().add(1, 'M');
2891
+ },
2892
+ get value() {
2893
+ return valueArr();
2894
+ },
2895
+ onChange: date => {
2896
+ if (props.multiple) {
2897
+ setValue([valueArr()[0], date]);
2898
+ } else {
2899
+ setValue(date);
2900
+ }
2901
+ }
2902
+ });
2903
+ }
2904
+ }), null);
2905
+ return _el$;
2906
+ })();
2907
+ };
2908
+ const Weeks = props => {
2909
+ const locale = useLocale();
2910
+ // 添加6周的天数
2911
+ const weeks = createMemo(() => {
2912
+ const month = props.month;
2913
+ let startDay = month.day();
2914
+ startDay = startDay === 0 ? 7 : startDay;
2915
+ const start = month.add(startDay === 1 ? 0 : 1 - startDay, 'day');
2916
+ return Array.from({
2917
+ length: 6
2918
+ }, (_, weekIndex) => Array.from({
2919
+ length: 7
2920
+ }, (__, dayIndex) => start.add(weekIndex * 7 + dayIndex, 'day')));
2921
+ });
2922
+ return (() => {
2923
+ var _el$7 = _tmpl$4$9(),
2924
+ _el$8 = _el$7.firstChild,
2925
+ _el$9 = _el$8.firstChild,
2926
+ _el$10 = _el$9.firstChild,
2927
+ _el$11 = _el$10.firstChild,
2928
+ _el$12 = _el$11.nextSibling,
2929
+ _el$13 = _el$12.nextSibling,
2930
+ _el$14 = _el$13.nextSibling,
2931
+ _el$15 = _el$14.nextSibling,
2932
+ _el$16 = _el$15.nextSibling,
2933
+ _el$17 = _el$16.nextSibling,
2934
+ _el$18 = _el$9.nextSibling;
2935
+ insert(_el$11, () => locale().DatePicker.Mon);
2936
+ insert(_el$12, () => locale().DatePicker.Tue);
2937
+ insert(_el$13, () => locale().DatePicker.Wed);
2938
+ insert(_el$14, () => locale().DatePicker.Thu);
2939
+ insert(_el$15, () => locale().DatePicker.Fri);
2940
+ insert(_el$16, () => locale().DatePicker.Sat);
2941
+ insert(_el$17, () => locale().DatePicker.Sun);
2942
+ insert(_el$18, createComponent(For, {
2943
+ get each() {
2944
+ return weeks();
2945
+ },
2946
+ children: week => (() => {
2947
+ var _el$19 = _tmpl$5$5();
2948
+ insert(_el$19, createComponent(For, {
2949
+ each: week,
2950
+ children: day => (() => {
2951
+ var _el$20 = _tmpl$6$2(),
2952
+ _el$21 = _el$20.firstChild;
2953
+ _el$21.$$click = () => {
2954
+ props.onChange(day);
2955
+ };
2956
+ insert(_el$21, () => day.date());
2957
+ effect(() => className(_el$21, cs(day.isSame(props.value[0]) || day.isSame(props.value[1]) ? 'bg-[--ant-color-primary]' : day.isAfter(props.value[0]) && props.value[1] && day.isBefore(props.value[1]) ? 'bg-#e6f4ff' : 'hover:bg-[--ant-date-picker-cell-hover-bg]', !day.isSame(props.month, 'M') && 'text-[--ant-color-text-disabled]', 'w-full h-full cursor-pointer flex justify-center items-center rounded-[--ant-border-radius-sm]')));
2958
+ return _el$20;
2959
+ })()
2960
+ }));
2961
+ return _el$19;
2962
+ })()
2963
+ }));
2964
+ return _el$7;
2965
+ })();
2966
+ };
2967
+ delegateEvents(["click"]);
2968
+
2969
+ const RangePicker = props => {
2970
+ const [value, setValue] = createControllableValue(props);
2971
+ return createComponent(RangeInput, mergeProps$1(props, {
2972
+ optionLabelRender: v => v?.format('YYYY-MM-DD'),
2973
+ get value() {
2974
+ return value();
2975
+ },
2976
+ onChange: setValue,
2977
+ placeholder: ['开始日期', '结束日期'],
2978
+ content: () => createComponent(Panel, mergeProps$1(props, {
2979
+ multiple: true,
2980
+ onChange: date => {
2981
+ setValue(date);
2982
+ }
2983
+ })),
2984
+ tooltipContentStyle: {
2985
+ width: 'fit-content'
2986
+ }
2987
+ }));
2988
+ };
2989
+
2990
+ var _tmpl$$D = /*#__PURE__*/template(`<div><div class="h-40px flex justify-center items-center border-t border-solid border-[--ant-color-border]">`);
2991
+ function DatePicker(props) {
2992
+ const locale = useLocale();
2993
+ const [selectInputProps] = splitProps(props, ['ref', 'multiple', 'allowClear', 'class', 'style', 'disabled', 'placeholder', 'status', 'size', 'variant', 'suffixIcon', 'placement', 'getPopupContainer', 'defaultOpen', 'open', 'onOpenChange']);
2994
+ const [value, _setValue] = createControllableValue(props, {
2995
+ trigger: false
2996
+ });
2997
+ const setValue = v => {
2998
+ _setValue(v);
2999
+ props.onChange?.(v, v?.format('YYYY-MM-DD'));
3000
+ };
3001
+ return createComponent(SelectInput, mergeProps$1({
3002
+ get placeholder() {
3003
+ return locale().DatePicker.placeholder;
3004
+ }
3005
+ }, selectInputProps, {
3006
+ get style() {
3007
+ return {
3008
+ '--ant-select-popup-match-width': undefined,
3009
+ // 覆盖掉内部的值
3010
+ ...selectInputProps.style
3011
+ };
3012
+ },
3013
+ get value() {
3014
+ return value()?.format('YYYY-MM-DD');
3015
+ },
3016
+ content: close => (() => {
3017
+ var _el$ = _tmpl$$D(),
3018
+ _el$2 = _el$.firstChild;
3019
+ insert(_el$, createComponent(Panel, mergeProps$1(props, {
3020
+ onChange: date => {
3021
+ if (!Array.isArray(date)) {
3022
+ setValue(date);
3023
+ close();
3024
+ }
3025
+ }
3026
+ })), _el$2);
3027
+ insert(_el$2, createComponent(Button$1, {
3028
+ type: "link",
3029
+ onClick: () => {
3030
+ setValue(dayjs());
3031
+ close();
3032
+ },
3033
+ get children() {
3034
+ return locale().DatePicker.today;
3035
+ }
3036
+ }));
3037
+ return _el$;
3038
+ })()
3039
+ }));
3040
+ }
3041
+ DatePicker.RangePicker = RangePicker;
3042
+
2761
3043
  var _tmpl$$C = /*#__PURE__*/template(`<svg width=64 height=41 viewBox="0 0 64 41"xmlns=http://www.w3.org/2000/svg><g transform="translate(0 1)"fill=none fill-rule=evenodd><ellipse fill=#f5f5f5 cx=32 cy=33 rx=32 ry=7></ellipse><g fill-rule=nonzero stroke=#d9d9d9><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"fill=#fafafa>`);
2762
3044
  const EmptySvg$1 = () => _tmpl$$C();
2763
3045
 
@@ -4867,10 +5149,7 @@ delegateEvents(["click"]);
4867
5149
 
4868
5150
  var _tmpl$$j = /*#__PURE__*/template(`<div><div class="mb-8px flex items-center"><span class="i-ant-design:exclamation-circle-fill text-#faad14"></span><span class="ml-8px font-600"></span></div><div class="ml-22px mb-8px"></div><div class=text-right>`);
4869
5151
  const Popconfirm = props => {
4870
- const mergedProps = mergeProps({
4871
- okText: '确定',
4872
- cancelText: '取消'
4873
- }, props);
5152
+ const locale = useLocale();
4874
5153
  const [tooltipProps] = splitProps(props, ['placement', 'arrow', 'getPopupContainer']);
4875
5154
  const [open, setOpen] = createSignal(false);
4876
5155
  return createComponent(Tooltip, mergeProps$1({
@@ -4887,17 +5166,17 @@ const Popconfirm = props => {
4887
5166
  _el$4 = _el$3.nextSibling,
4888
5167
  _el$5 = _el$2.nextSibling,
4889
5168
  _el$6 = _el$5.nextSibling;
4890
- insert(_el$4, () => mergedProps.title);
4891
- insert(_el$5, () => mergedProps.content);
5169
+ insert(_el$4, () => props.title);
5170
+ insert(_el$5, () => props.content);
4892
5171
  insert(_el$6, createComponent(Button$1, {
4893
5172
  "class": "ml-8px",
4894
5173
  size: "small",
4895
5174
  onClick: () => {
4896
5175
  setOpen(false);
4897
- untrack(() => mergedProps.onCancel?.());
5176
+ untrack(() => props.onCancel?.());
4898
5177
  },
4899
5178
  get children() {
4900
- return mergedProps.cancelText;
5179
+ return props.cancelText ?? locale()?.Popconfirm.cancelText;
4901
5180
  }
4902
5181
  }), null);
4903
5182
  insert(_el$6, createComponent(Button$1, {
@@ -4906,17 +5185,17 @@ const Popconfirm = props => {
4906
5185
  size: "small",
4907
5186
  onClick: () => {
4908
5187
  setOpen(false);
4909
- untrack(() => mergedProps.onConfirm?.());
5188
+ untrack(() => props.onConfirm?.());
4910
5189
  },
4911
5190
  get children() {
4912
- return mergedProps.okText;
5191
+ return props.okText ?? locale()?.Popconfirm.okText;
4913
5192
  }
4914
5193
  }), null);
4915
5194
  return _el$;
4916
5195
  })()
4917
5196
  }, tooltipProps, {
4918
5197
  get children() {
4919
- return mergedProps.children;
5198
+ return props.children;
4920
5199
  }
4921
5200
  }));
4922
5201
  };
@@ -5283,7 +5562,7 @@ var _tmpl$$f = /*#__PURE__*/template(`<label class=mr-4px>`),
5283
5562
  _tmpl$2$6 = /*#__PURE__*/template(`<span class=text-[var(--ant-color-error)]>*`),
5284
5563
  _tmpl$3$6 = /*#__PURE__*/template(`<div class="flex items-center"><label>`),
5285
5564
  _tmpl$4$4 = /*#__PURE__*/template(`<div class="absolute top-[100%] text-[var(--ant-color-error)]">`),
5286
- _tmpl$5$3 = /*#__PURE__*/template(`<div class="flex flex-col relative flex-grow-1"><div class=flex>`);
5565
+ _tmpl$5$3 = /*#__PURE__*/template(`<div class="flex flex-col relative flex-grow-1"><div>`);
5287
5566
  const FormItem = props => {
5288
5567
  const {
5289
5568
  formInstance,
@@ -8145,7 +8424,22 @@ const locale = {
8145
8424
  Modal: {
8146
8425
  okText: 'OK',
8147
8426
  cancelText: 'Cancel'
8427
+ },
8428
+ Popconfirm: {
8429
+ okText: 'OK',
8430
+ cancelText: 'Cancel'
8431
+ },
8432
+ DatePicker: {
8433
+ placeholder: 'Please enter the date',
8434
+ today: 'Today',
8435
+ Mon: 'Mon',
8436
+ Tue: 'Tue',
8437
+ Wed: 'Wed',
8438
+ Thu: 'Thu',
8439
+ Fri: 'Fri',
8440
+ Sat: 'Sat',
8441
+ Sun: 'Sun'
8148
8442
  }
8149
8443
  };
8150
8444
 
8151
- export { Alert, Button$1 as Button, Checkbox, CodeInput, Collapse, ColorPicker, Command, Compact, CompactContextIsolator, ConfigProvider, index as ContextMenu, Cursor, DelayShow, Divider, Drawer, Dropdown, Element$1 as Element, Empty, Form, Fragment, Image, Input, InputNumber, Menu, Modal, Popconfirm, Popover, Progress, Radio, RangeInput, Result, Segmented, Select, SelectInput, Slider, Space, Spin, Switch, Table, Tabs, Timeline, Tooltip, Transformer, Tree, TreeFor, TreeSelect, Upload, createControllableValue, locale as enUS, message, setupGlobalDrag, useClickAway, useCounter, useFocus, useHover, useMouse, useScroll, useSize, useVirtualList, locale$1 as zhCN };
8445
+ export { Alert, Button$1 as Button, Checkbox, CodeInput, Collapse, ColorPicker, Command, Compact, CompactContextIsolator, ConfigProvider, index as ContextMenu, Cursor, DatePicker, DelayShow, Divider, Drawer, Dropdown, Element$1 as Element, Empty, Form, Fragment, Image, Input, InputNumber, Menu, Modal, Popconfirm, Popover, Progress, Radio, RangeInput, Result, Segmented, Select, SelectInput, Slider, Space, Spin, Switch, Table, Tabs, Timeline, Tooltip, Transformer, Tree, TreeFor, TreeSelect, Upload, createControllableValue, locale as enUS, message, setupGlobalDrag, useClickAway, useCounter, useFocus, useHover, useMouse, useScroll, useSize, useVirtualList, locale$1 as zhCN };