@sia.soul/sia-react-ui 0.1.88 → 0.1.90
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/{chunk-RR7HW5HO.js → chunk-7BJPQCRG.js} +4 -3
- package/dist/{chunk-D752QGE6.js → chunk-AG2VFAZR.js} +2 -2
- package/dist/{chunk-U2WPN6TD.js → chunk-G5K72R4O.js} +516 -241
- package/dist/{chunk-QZG6XT65.js → chunk-GLXGN5SO.js} +2 -2
- package/dist/{chunk-CKX3AKMT.js → chunk-OPYA3PMD.js} +1 -1
- package/dist/{core-BU7dVRuz.d.ts → core-BGA9VB0L.d.ts} +10 -5
- package/dist/{core-DGaJTy1i.d.cts → core-OIIkAeiG.d.cts} +10 -5
- package/dist/core.cjs +1133 -858
- package/dist/core.css +1 -0
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +3 -3
- package/dist/index.cjs +3330 -3054
- package/dist/index.css +1 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/rich-text-editor.cjs +768 -493
- package/dist/rich-text-editor.js +2 -2
- package/dist/select-date-range.cjs +928 -653
- package/dist/select-date-range.js +3 -3
- package/package.json +1 -1
|
@@ -321,10 +321,10 @@ function useFloatingPlaceholder({ mode, placeholder, filled, active = false }) {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
// src/components/DatePicker.tsx
|
|
324
|
-
var
|
|
324
|
+
var import_react8 = require("react");
|
|
325
325
|
|
|
326
326
|
// src/components/Icon.tsx
|
|
327
|
-
var
|
|
327
|
+
var import_react4 = require("react");
|
|
328
328
|
|
|
329
329
|
// src/components/IconCatalog.tsx
|
|
330
330
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -809,327 +809,602 @@ var extendedIconPaths = {
|
|
|
809
809
|
] })
|
|
810
810
|
};
|
|
811
811
|
|
|
812
|
-
// src/components/
|
|
812
|
+
// src/components/iconBounds.ts
|
|
813
|
+
var outlineIconBounds = {
|
|
814
|
+
"activity": [3, 6, 18, 13],
|
|
815
|
+
"align-center": [4, 6, 16, 12],
|
|
816
|
+
"align-justify": [4, 6, 16, 12],
|
|
817
|
+
"align-left": [4, 6, 16, 12],
|
|
818
|
+
"align-right": [4, 6, 16, 12],
|
|
819
|
+
"appstore": [3, 3, 18, 18],
|
|
820
|
+
"area-chart": [3, 5, 18, 15],
|
|
821
|
+
"arrow-down": [5, 3, 14, 18],
|
|
822
|
+
"arrow-left": [3, 5, 18, 14],
|
|
823
|
+
"arrow-right": [3, 5, 18, 14],
|
|
824
|
+
"arrow-up": [5, 3, 14, 18],
|
|
825
|
+
"bank": [3, 3, 18, 18],
|
|
826
|
+
"bar-chart": [3, 4, 18, 17],
|
|
827
|
+
"barcode": [4, 5, 16, 14],
|
|
828
|
+
"bell": [3, 3, 18, 18],
|
|
829
|
+
"bold": [7, 4, 11, 16],
|
|
830
|
+
"book": [4, 3, 16, 19],
|
|
831
|
+
"branches": [4, 3, 16, 18],
|
|
832
|
+
"bug": [5, 5, 14, 15],
|
|
833
|
+
"bulb": [5.000001, 2.255438, 14.000001, 18.744562],
|
|
834
|
+
"calculator": [5, 2, 14, 20],
|
|
835
|
+
"calendar": [3, 3, 18, 18],
|
|
836
|
+
"camera": [3, 4, 18, 16],
|
|
837
|
+
"car": [3, 4, 18, 16],
|
|
838
|
+
"check": [4, 6.5, 16, 11],
|
|
839
|
+
"chevron-down": [5, 8.5, 14, 7],
|
|
840
|
+
"chevron-left": [8.5, 5, 7, 14],
|
|
841
|
+
"chevron-right": [8.5, 5, 7, 14],
|
|
842
|
+
"chevron-up": [5, 8.5, 14, 7],
|
|
843
|
+
"circle-check": [3, 3, 18, 18],
|
|
844
|
+
"circle-close": [3, 3, 18, 18],
|
|
845
|
+
"circle-minus": [3, 3, 18, 18],
|
|
846
|
+
"circle-plus": [3, 3, 18, 18],
|
|
847
|
+
"clipboard": [5, 3, 14, 18],
|
|
848
|
+
"clipboard-check": [5, 3, 14, 18],
|
|
849
|
+
"clock": [3, 3, 18, 18],
|
|
850
|
+
"close": [5, 5, 14, 14],
|
|
851
|
+
"cloud": [1.267807, 5.290112, 20.99, 13.79396],
|
|
852
|
+
"cloud-download": [1.100703, 5.621803, 21.657103, 15.378197],
|
|
853
|
+
"cloud-upload": [1.100703, 5.621803, 21.657103, 15.378197],
|
|
854
|
+
"code": [3, 6, 18, 12],
|
|
855
|
+
"coffee": [4, 3, 18, 17],
|
|
856
|
+
"columns": [3, 4, 18, 16],
|
|
857
|
+
"comments": [3, 4, 18, 17],
|
|
858
|
+
"compass": [3, 3, 18, 18],
|
|
859
|
+
"component": [4, 4, 16, 16],
|
|
860
|
+
"copy": [4, 4, 16, 16],
|
|
861
|
+
"corner-up-left": [4, 5, 16, 14],
|
|
862
|
+
"corner-up-right": [4, 5, 16, 14],
|
|
863
|
+
"database": [4, 2, 16, 20],
|
|
864
|
+
"desktop": [3, 3, 18, 18],
|
|
865
|
+
"double-left": [5, 5, 14, 14],
|
|
866
|
+
"double-right": [5, 5, 14, 14],
|
|
867
|
+
"download": [4, 3, 16, 17],
|
|
868
|
+
"edit": [4, 4.171572, 16, 15.828428],
|
|
869
|
+
"eraser": [4, 5, 17, 15],
|
|
870
|
+
"expand": [4, 4, 16, 16],
|
|
871
|
+
"experiment": [3.720577, 3, 16.558847, 19.019615],
|
|
872
|
+
"external-link": [3, 4, 17, 17],
|
|
873
|
+
"eye": [2.5, 6, 19, 12],
|
|
874
|
+
"eye-off": [2.5, 3, 19, 18],
|
|
875
|
+
"fast-backward": [4, 6, 16, 12],
|
|
876
|
+
"fast-forward": [4, 6, 16, 12],
|
|
877
|
+
"file": [6, 3, 12, 18],
|
|
878
|
+
"file-check": [6, 3, 12, 18],
|
|
879
|
+
"file-plus": [6, 3, 12, 18],
|
|
880
|
+
"file-spreadsheet": [6, 3, 12, 18],
|
|
881
|
+
"file-warning": [6, 3, 12, 18],
|
|
882
|
+
"filter": [3, 5, 18, 16],
|
|
883
|
+
"flip-horizontal": [3, 3, 18, 18],
|
|
884
|
+
"flip-vertical": [3, 3, 18, 18],
|
|
885
|
+
"folder": [3, 6, 18, 13],
|
|
886
|
+
"folder-plus": [3, 6, 18, 13],
|
|
887
|
+
"frown": [3, 3, 18, 18],
|
|
888
|
+
"fullscreen": [4, 4, 16, 16],
|
|
889
|
+
"fullscreen-exit": [4, 4, 16, 16],
|
|
890
|
+
"game-backpack": [4, 1.5, 16, 19.5],
|
|
891
|
+
"game-cultivator": [7, 2, 10, 19],
|
|
892
|
+
"game-elixir-jar": [5, 3, 14, 18],
|
|
893
|
+
"game-flame": [4.5, 2.5, 15.000168, 19.950167],
|
|
894
|
+
"game-gem": [4, 4, 16, 17],
|
|
895
|
+
"game-herb": [4, 5.488038, 16, 15.511962],
|
|
896
|
+
"game-ingot": [3, 6, 18, 13.5],
|
|
897
|
+
"game-meditate": [4, 3, 16, 18],
|
|
898
|
+
"game-necklace": [5, 4, 14, 16],
|
|
899
|
+
"game-pants": [6, 3, 12, 18],
|
|
900
|
+
"game-pendant": [5, 4, 14, 16.6],
|
|
901
|
+
"game-pill": [4.510922, 4.522434, 14.966641, 14.966642],
|
|
902
|
+
"game-potion": [4.370614, 3, 15.258771, 18.002394],
|
|
903
|
+
"game-qi": [3, 3, 18, 18],
|
|
904
|
+
"game-robe": [4.5, 4, 15, 17],
|
|
905
|
+
"game-soul-elixir": [2.5, 2.5, 19, 19],
|
|
906
|
+
"game-spirit-wolf": [4, 4.2, 16.025938, 16.5],
|
|
907
|
+
"game-sword": [4, 3.5, 15.5, 16.5],
|
|
908
|
+
"game-swordsman": [7, 2.5, 12.900002, 18.5],
|
|
909
|
+
"gift": [3, 3.17335, 18, 17.826651],
|
|
910
|
+
"github": [3.699682, 3.977686, 16.600634, 18.022314],
|
|
911
|
+
"heart": [1.584567, 4.178144, 20.83729, 16.821857],
|
|
912
|
+
"help-circle": [3, 3, 18, 18],
|
|
913
|
+
"highlighter": [3, 4, 16, 16],
|
|
914
|
+
"home": [3.5, 4, 17, 16],
|
|
915
|
+
"image": [3, 4, 18, 16],
|
|
916
|
+
"info": [3, 3, 18, 18],
|
|
917
|
+
"italic": [6, 4, 12, 16],
|
|
918
|
+
"key": [4, 4, 15, 15],
|
|
919
|
+
"laptop": [3, 5, 18, 14],
|
|
920
|
+
"line-chart": [3, 5, 18, 15],
|
|
921
|
+
"link": [-0.034671, 4.964466, 24.070208, 14.070206],
|
|
922
|
+
"list-ordered": [4, 5, 17, 15],
|
|
923
|
+
"list-unordered": [4, 5.5, 17, 13],
|
|
924
|
+
"loader": [3, 3, 18, 18],
|
|
925
|
+
"location": [5, 2, 14, 20],
|
|
926
|
+
"lock": [4, 3, 16, 18],
|
|
927
|
+
"login": [5, 5, 12, 14],
|
|
928
|
+
"logout": [7, 5, 12, 14],
|
|
929
|
+
"mail": [3, 5, 18, 14],
|
|
930
|
+
"meh": [3, 3, 18, 18],
|
|
931
|
+
"menu": [4, 6, 16, 12],
|
|
932
|
+
"menu-fold": [4, 6, 16, 12],
|
|
933
|
+
"menu-unfold": [4, 6, 16, 12],
|
|
934
|
+
"message": [4, 4, 16, 17],
|
|
935
|
+
"microphone": [5, 3, 14, 18],
|
|
936
|
+
"minus": [4, 12, 16, 0],
|
|
937
|
+
"mobile": [7, 2, 10, 20],
|
|
938
|
+
"moon": [3.717114, 4, 16.282887, 16.282888],
|
|
939
|
+
"more-horizontal": [5, 12, 14.1, 0],
|
|
940
|
+
"more-vertical": [12, 5, 0, 14.1],
|
|
941
|
+
"move": [3, 3, 18, 18],
|
|
942
|
+
"notepad-file": [3.375, 1.875, 17.25, 20.25],
|
|
943
|
+
"notepad-folder": [1.875, 2.25, 20.2875, 19.5],
|
|
944
|
+
"notepad-virtual-folder": [0.75, 0.75, 22.5, 22.5],
|
|
945
|
+
"paperclip": [1.136039, 3, 21.106602, 18.86396],
|
|
946
|
+
"partition": [4, 1, 16, 20],
|
|
947
|
+
"pause": [3, 3, 18, 18],
|
|
948
|
+
"phone": [4.161916, 3.5, 16.338085, 16.338085],
|
|
949
|
+
"pie-chart": [2, 3, 18.5, 18],
|
|
950
|
+
"pin": [6.5, 3, 11, 18],
|
|
951
|
+
"pin-off": [3, 3, 18, 18],
|
|
952
|
+
"play": [3, 3, 18, 18],
|
|
953
|
+
"plus": [4, 4, 16, 16],
|
|
954
|
+
"power": [4, 3, 16.000002, 16.744997],
|
|
955
|
+
"printer": [4, 3, 16, 18],
|
|
956
|
+
"puzzle": [3, 3, 18, 18],
|
|
957
|
+
"qr-code": [3, 3, 18, 18],
|
|
958
|
+
"question": [3, 3, 18, 18],
|
|
959
|
+
"redo": [4, 7, 17, 12],
|
|
960
|
+
"refresh": [3.999998, 3.999709, 16.000002, 16.000002],
|
|
961
|
+
"rocket": [3, 3, 18, 18],
|
|
962
|
+
"rotate-left": [4, 3, 15.416197, 17],
|
|
963
|
+
"rotate-right": [4.583802, 3, 15.416199, 17],
|
|
964
|
+
"rows": [3, 4, 18, 16],
|
|
965
|
+
"save": [4, 3, 16, 18],
|
|
966
|
+
"scan": [3, 3, 18, 18],
|
|
967
|
+
"scissors": [3, 4, 17, 16],
|
|
968
|
+
"search": [4, 4, 17, 17],
|
|
969
|
+
"send": [3, 3, 18, 18],
|
|
970
|
+
"server": [3, 4, 18, 16],
|
|
971
|
+
"settings": [4, 4, 16, 16],
|
|
972
|
+
"share": [3, 2, 18, 20],
|
|
973
|
+
"shield": [4, 3, 16, 19],
|
|
974
|
+
"shield-check": [4, 3, 16, 19],
|
|
975
|
+
"shop": [3, 4, 18, 17],
|
|
976
|
+
"shopping-bag": [4, 3, 16, 18],
|
|
977
|
+
"shopping-cart": [3, 4, 17, 17],
|
|
978
|
+
"shrink": [5, 4, 14, 16],
|
|
979
|
+
"smile": [3, 3, 18, 18],
|
|
980
|
+
"sort-ascending": [3.5, 5, 17.5, 14],
|
|
981
|
+
"sort-descending": [3.5, 5, 17.5, 14],
|
|
982
|
+
"speaker-muted": [4, 6.4, 16.5, 11.200001],
|
|
983
|
+
"speaker-wave": [4, 6.4, 12.343426, 11.200001],
|
|
984
|
+
"square-check": [3, 3, 18, 18],
|
|
985
|
+
"square-close": [3, 3, 18, 18],
|
|
986
|
+
"square-minus": [3, 3, 18, 18],
|
|
987
|
+
"square-plus": [3, 3, 18, 18],
|
|
988
|
+
"star": [3, 3, 18, 17.200001],
|
|
989
|
+
"step-backward": [6, 5, 12, 14],
|
|
990
|
+
"step-forward": [6, 5, 12, 14],
|
|
991
|
+
"stop": [3, 3, 18, 18],
|
|
992
|
+
"strikethrough": [5, 4, 14, 16],
|
|
993
|
+
"sun": [2.5, 2.5, 19, 19],
|
|
994
|
+
"swap-horizontal": [4, 4, 16, 16],
|
|
995
|
+
"swap-vertical": [4, 4, 16, 16],
|
|
996
|
+
"tab-plus": [3, 4, 18, 16],
|
|
997
|
+
"table": [3, 4, 18, 16],
|
|
998
|
+
"tablet": [5, 2, 14, 20],
|
|
999
|
+
"tag": [3, 4, 18, 17],
|
|
1000
|
+
"tags": [3, 4, 18, 17],
|
|
1001
|
+
"target": [3, 3, 18, 18],
|
|
1002
|
+
"tilde": [3, 9.214088, 18, 4.785912],
|
|
1003
|
+
"token": [2.5, 2.5, 19, 19],
|
|
1004
|
+
"tool": [4.870828, 2.816625, 16.750492, 16.804695],
|
|
1005
|
+
"trash": [4, 3, 16, 18],
|
|
1006
|
+
"trending-down": [4, 7, 16, 9],
|
|
1007
|
+
"trending-up": [4, 8, 16, 9],
|
|
1008
|
+
"trophy": [3.997966, 4, 16.004068, 16],
|
|
1009
|
+
"truck": [3, 5, 18, 16],
|
|
1010
|
+
"underline": [5, 4, 14, 17],
|
|
1011
|
+
"undo": [3, 7, 17, 12],
|
|
1012
|
+
"unlock": [4, 2.935554, 16, 18.064445],
|
|
1013
|
+
"upload": [4, 4, 16, 16],
|
|
1014
|
+
"user": [4.5, 4, 15, 17],
|
|
1015
|
+
"user-minus": [3, 4, 19.5, 17],
|
|
1016
|
+
"user-plus": [3, 4, 19.5, 17],
|
|
1017
|
+
"users": [2.8, 4.5, 18.300001, 15.5],
|
|
1018
|
+
"vertical-align-bottom": [4, 4, 16, 16],
|
|
1019
|
+
"vertical-align-middle": [4, 4, 16, 16],
|
|
1020
|
+
"vertical-align-top": [4, 4, 16, 16],
|
|
1021
|
+
"video": [3, 5, 18, 14],
|
|
1022
|
+
"volume-off": [4, 6, 18, 12],
|
|
1023
|
+
"volume-up": [4, 6, 16.690525, 12],
|
|
1024
|
+
"wallet": [3, 5, 18, 15],
|
|
1025
|
+
"warning": [2.33137, 3.153565, 19.337257, 17.847614],
|
|
1026
|
+
"wifi": [3, 5.723805, 18, 15.376196],
|
|
1027
|
+
"zoom-in": [4, 4, 17, 17],
|
|
1028
|
+
"zoom-out": [4, 4, 17, 17]
|
|
1029
|
+
};
|
|
1030
|
+
var filledIconBounds = {
|
|
1031
|
+
"bell": [3, 2.499593, 18, 19.423376],
|
|
1032
|
+
"book": [3, 1, 18, 22],
|
|
1033
|
+
"calendar": [2.5, 2.5, 19, 19],
|
|
1034
|
+
"circle-check": [2, 2, 20, 20],
|
|
1035
|
+
"circle-close": [2, 2, 20, 20],
|
|
1036
|
+
"circle-minus": [2, 2, 20, 20],
|
|
1037
|
+
"circle-plus": [2, 2, 20, 20],
|
|
1038
|
+
"clock": [2, 2, 20, 20],
|
|
1039
|
+
"component": [3, 3, 18, 18],
|
|
1040
|
+
"file": [5, 2.5, 14, 19.5],
|
|
1041
|
+
"filter": [2, 4, 20, 18],
|
|
1042
|
+
"folder": [2.5, 5, 19, 15],
|
|
1043
|
+
"heart": [1.247845, 3.647845, 21.504313, 17.652155],
|
|
1044
|
+
"home": [2.157447, 2.8, 19.500002, 18.200001],
|
|
1045
|
+
"image": [2.5, 3.5, 19, 17],
|
|
1046
|
+
"info": [2, 2, 20, 20],
|
|
1047
|
+
"lock": [3, 2, 18, 20],
|
|
1048
|
+
"mail": [2.5, 4.5, 19, 15],
|
|
1049
|
+
"pause": [2, 2, 20, 20],
|
|
1050
|
+
"play": [2, 2, 20, 20],
|
|
1051
|
+
"question": [2, 2, 20, 20],
|
|
1052
|
+
"star": [2.4, 2.199999, 19.200001, 18.200001],
|
|
1053
|
+
"token": [1, 1, 22, 22],
|
|
1054
|
+
"trash": [3, 3, 18, 18],
|
|
1055
|
+
"unlock": [3, 1.979363, 18, 20.020638],
|
|
1056
|
+
"user": [3.5, 3, 17, 18],
|
|
1057
|
+
"users": [1.8, 4.2, 19.6, 16.799999],
|
|
1058
|
+
"warning": [1.53137, 2.553565, 20.937256, 19.447613]
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
// src/components/iconGeometry.tsx
|
|
1062
|
+
var import_react3 = require("react");
|
|
813
1063
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1064
|
+
function compensateStroke(node, scale) {
|
|
1065
|
+
return import_react3.Children.map(node, (child) => {
|
|
1066
|
+
if (!(0, import_react3.isValidElement)(child)) return child;
|
|
1067
|
+
const props = child.props;
|
|
1068
|
+
return (0, import_react3.cloneElement)(child, {
|
|
1069
|
+
...props.strokeWidth === void 0 ? {} : { strokeWidth: Number(props.strokeWidth) / scale },
|
|
1070
|
+
...props.children === void 0 ? {} : { children: compensateStroke(props.children, scale) }
|
|
1071
|
+
});
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
function normalizeIconPaths(paths, bounds) {
|
|
1075
|
+
return Object.fromEntries(Object.entries(paths).map(([name, node]) => {
|
|
1076
|
+
const [x, y, width, height] = bounds[name];
|
|
1077
|
+
const scale = 18 / Math.max(width, height);
|
|
1078
|
+
const transform = `translate(${12 - (x + width / 2) * scale} ${12 - (y + height / 2) * scale}) scale(${scale})`;
|
|
1079
|
+
return [name, { scale, node: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("g", { transform, children: compensateStroke(node, scale) }) }];
|
|
1080
|
+
}));
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
// src/components/Icon.tsx
|
|
1084
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
814
1085
|
var coreIconPaths = {
|
|
815
|
-
search: /* @__PURE__ */ (0,
|
|
816
|
-
/* @__PURE__ */ (0,
|
|
817
|
-
/* @__PURE__ */ (0,
|
|
1086
|
+
search: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1087
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "10.8", cy: "10.8", r: "6.8" }),
|
|
1088
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m15.8 15.8 5.2 5.2" })
|
|
818
1089
|
] }),
|
|
819
|
-
plus: /* @__PURE__ */ (0,
|
|
1090
|
+
plus: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 4v16M4 12h16" }),
|
|
820
1091
|
// 数字区间用波浪线表达范围,避免箭头暗示跳转方向。
|
|
821
|
-
tilde: /* @__PURE__ */ (0,
|
|
822
|
-
minus: /* @__PURE__ */ (0,
|
|
823
|
-
close: /* @__PURE__ */ (0,
|
|
824
|
-
check: /* @__PURE__ */ (0,
|
|
825
|
-
info: /* @__PURE__ */ (0,
|
|
826
|
-
/* @__PURE__ */ (0,
|
|
827
|
-
/* @__PURE__ */ (0,
|
|
828
|
-
] }),
|
|
829
|
-
question: /* @__PURE__ */ (0,
|
|
830
|
-
/* @__PURE__ */ (0,
|
|
831
|
-
/* @__PURE__ */ (0,
|
|
832
|
-
] }),
|
|
833
|
-
warning: /* @__PURE__ */ (0,
|
|
834
|
-
/* @__PURE__ */ (0,
|
|
835
|
-
/* @__PURE__ */ (0,
|
|
836
|
-
] }),
|
|
837
|
-
"circle-check": /* @__PURE__ */ (0,
|
|
838
|
-
/* @__PURE__ */ (0,
|
|
839
|
-
/* @__PURE__ */ (0,
|
|
840
|
-
] }),
|
|
841
|
-
"circle-close": /* @__PURE__ */ (0,
|
|
842
|
-
/* @__PURE__ */ (0,
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
844
|
-
] }),
|
|
845
|
-
"circle-plus": /* @__PURE__ */ (0,
|
|
846
|
-
/* @__PURE__ */ (0,
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
848
|
-
] }),
|
|
849
|
-
"circle-minus": /* @__PURE__ */ (0,
|
|
850
|
-
/* @__PURE__ */ (0,
|
|
851
|
-
/* @__PURE__ */ (0,
|
|
852
|
-
] }),
|
|
853
|
-
"chevron-left": /* @__PURE__ */ (0,
|
|
854
|
-
"chevron-right": /* @__PURE__ */ (0,
|
|
855
|
-
"chevron-up": /* @__PURE__ */ (0,
|
|
856
|
-
"chevron-down": /* @__PURE__ */ (0,
|
|
857
|
-
"double-left": /* @__PURE__ */ (0,
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
860
|
-
] }),
|
|
861
|
-
"double-right": /* @__PURE__ */ (0,
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
863
|
-
/* @__PURE__ */ (0,
|
|
864
|
-
] }),
|
|
865
|
-
"arrow-left": /* @__PURE__ */ (0,
|
|
866
|
-
/* @__PURE__ */ (0,
|
|
867
|
-
/* @__PURE__ */ (0,
|
|
868
|
-
] }),
|
|
869
|
-
"arrow-right": /* @__PURE__ */ (0,
|
|
870
|
-
/* @__PURE__ */ (0,
|
|
871
|
-
/* @__PURE__ */ (0,
|
|
872
|
-
] }),
|
|
873
|
-
"arrow-up": /* @__PURE__ */ (0,
|
|
874
|
-
/* @__PURE__ */ (0,
|
|
875
|
-
/* @__PURE__ */ (0,
|
|
876
|
-
] }),
|
|
877
|
-
"arrow-down": /* @__PURE__ */ (0,
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
879
|
-
/* @__PURE__ */ (0,
|
|
880
|
-
] }),
|
|
881
|
-
menu: /* @__PURE__ */ (0,
|
|
882
|
-
"more-horizontal": /* @__PURE__ */ (0,
|
|
883
|
-
"more-vertical": /* @__PURE__ */ (0,
|
|
884
|
-
home: /* @__PURE__ */ (0,
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
886
|
-
/* @__PURE__ */ (0,
|
|
887
|
-
] }),
|
|
888
|
-
user: /* @__PURE__ */ (0,
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
891
|
-
] }),
|
|
892
|
-
users: /* @__PURE__ */ (0,
|
|
893
|
-
/* @__PURE__ */ (0,
|
|
894
|
-
/* @__PURE__ */ (0,
|
|
895
|
-
/* @__PURE__ */ (0,
|
|
896
|
-
] }),
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
/* @__PURE__ */ (0,
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
/* @__PURE__ */ (0,
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
/* @__PURE__ */ (0,
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
/* @__PURE__ */ (0,
|
|
913
|
-
/* @__PURE__ */ (0,
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
/* @__PURE__ */ (0,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
/* @__PURE__ */ (0,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
/* @__PURE__ */ (0,
|
|
1092
|
+
tilde: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 14c3-8 6-4 9-2s6 4 9-2" }),
|
|
1093
|
+
minus: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 12h16" }),
|
|
1094
|
+
close: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m5 5 14 14M19 5 5 19" }),
|
|
1095
|
+
check: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m4 12.5 5.2 5L20 6.5" }),
|
|
1096
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1097
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1098
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 11v6M12 7.2v.1" })
|
|
1099
|
+
] }),
|
|
1100
|
+
question: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1101
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1102
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9.8 9a2.4 2.4 0 1 1 3.5 2.2c-.9.5-1.3 1.1-1.3 2.1M12 16.8v.1" })
|
|
1103
|
+
] }),
|
|
1104
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1105
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M10.3 4.1 2.6 18a2 2 0 0 0 1.8 3h15.2a2 2 0 0 0 1.8-3L13.7 4.1a2 2 0 0 0-3.4 0Z" }),
|
|
1106
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 9v4M12 17v.1" })
|
|
1107
|
+
] }),
|
|
1108
|
+
"circle-check": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1109
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1110
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m8 12 2.7 2.7L16.5 9" })
|
|
1111
|
+
] }),
|
|
1112
|
+
"circle-close": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1114
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m9 9 6 6M15 9l-6 6" })
|
|
1115
|
+
] }),
|
|
1116
|
+
"circle-plus": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1117
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 8v8M8 12h8" })
|
|
1119
|
+
] }),
|
|
1120
|
+
"circle-minus": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 12h8" })
|
|
1123
|
+
] }),
|
|
1124
|
+
"chevron-left": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m15.5 5-7 7 7 7" }),
|
|
1125
|
+
"chevron-right": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m8.5 5 7 7-7 7" }),
|
|
1126
|
+
"chevron-up": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m5 15.5 7-7 7 7" }),
|
|
1127
|
+
"chevron-down": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m5 8.5 7 7 7-7" }),
|
|
1128
|
+
"double-left": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1129
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m12 5-7 7 7 7" }),
|
|
1130
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m19 5-7 7 7 7" })
|
|
1131
|
+
] }),
|
|
1132
|
+
"double-right": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m5 5 7 7-7 7" }),
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m12 5 7 7-7 7" })
|
|
1135
|
+
] }),
|
|
1136
|
+
"arrow-left": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m10 5-7 7 7 7" }),
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 12h18" })
|
|
1139
|
+
] }),
|
|
1140
|
+
"arrow-right": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m14 5 7 7-7 7" }),
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 12h18" })
|
|
1143
|
+
] }),
|
|
1144
|
+
"arrow-up": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m5 10 7-7 7 7" }),
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3v18" })
|
|
1147
|
+
] }),
|
|
1148
|
+
"arrow-down": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m5 14 7 7 7-7" }),
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3v18" })
|
|
1151
|
+
] }),
|
|
1152
|
+
menu: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 6h16M4 12h16M4 18h16" }),
|
|
1153
|
+
"more-horizontal": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M5 12h.1M12 12h.1M19 12h.1" }),
|
|
1154
|
+
"more-vertical": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 5v.1M12 12v.1M12 19v.1" }),
|
|
1155
|
+
home: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1156
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m3.5 11 8.5-7 8.5 7" }),
|
|
1157
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M5.5 9.5V20h13V9.5M9.5 20v-6h5v6" })
|
|
1158
|
+
] }),
|
|
1159
|
+
user: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "8", r: "4" }),
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4.5 21c.7-4.2 3.2-6.5 7.5-6.5s6.8 2.3 7.5 6.5" })
|
|
1162
|
+
] }),
|
|
1163
|
+
users: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "9", cy: "8", r: "3.5" }),
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.8 20c.6-3.8 2.7-5.8 6.2-5.8s5.6 2 6.2 5.8" }),
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M15 5.2a3.5 3.5 0 0 1 0 6.6M16.2 14.5c2.9.5 4.4 2.3 4.9 5.5" })
|
|
1167
|
+
] }),
|
|
1168
|
+
// 保留齿轮原始路径;与其余图标一起通过统一几何规则调整主体大小。
|
|
1169
|
+
settings: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1170
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "2.8" }),
|
|
1171
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M10.4 6.24 10.4 4 13.6 4 13.6 6.24 14.944 6.792 16.528 5.208 18.792 7.472 17.208 9.056 17.76 10.4 20 10.4 20 13.6 17.76 13.6 17.208 14.944 18.792 16.528 16.528 18.792 14.944 17.208 13.6 17.76 13.6 20 10.4 20 10.4 17.76 9.056 17.208 7.472 18.792 5.208 16.528 6.792 14.944 6.24 13.6 4 13.6 4 10.4 6.24 10.4 6.792 9.056 5.208 7.472 7.472 5.208 9.056 6.792Z" })
|
|
1172
|
+
] }),
|
|
1173
|
+
edit: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m13.5 6.5 4 4M4 20h16" })
|
|
1176
|
+
] }),
|
|
1177
|
+
copy: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "8", y: "8", width: "12", height: "12", rx: "2.5" }),
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2" })
|
|
1180
|
+
] }),
|
|
1181
|
+
trash: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 7h16M9 3h6l1 4H8l1-4ZM6 7l1 14h10l1-14M10 11v6M14 11v6" }) }),
|
|
1182
|
+
scissors: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "6", cy: "7", r: "3" }),
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "6", cy: "17", r: "3" }),
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m8.7 8.3 11.3 6.2M8.7 15.7 20 9.5" })
|
|
1186
|
+
] }),
|
|
1187
|
+
undo: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m8 7-5 5 5 5" }),
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 12h10a7 7 0 0 1 7 7" })
|
|
1190
|
+
] }),
|
|
1191
|
+
redo: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m16 7 5 5-5 5" }),
|
|
1193
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M21 12H11a7 7 0 0 0-7 7" })
|
|
1194
|
+
] }),
|
|
1195
|
+
"zoom-in": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "10.8", cy: "10.8", r: "6.8" }),
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m15.8 15.8 5.2 5.2M10.8 7.8v6M7.8 10.8h6" })
|
|
1198
|
+
] }),
|
|
1199
|
+
"zoom-out": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "10.8", cy: "10.8", r: "6.8" }),
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m15.8 15.8 5.2 5.2M7.8 10.8h6" })
|
|
930
1202
|
] }),
|
|
931
1203
|
// 图片变换工具使用独立图标,便于在预览及其他编辑界面复用。
|
|
932
|
-
"flip-horizontal": /* @__PURE__ */ (0,
|
|
933
|
-
"flip-vertical": /* @__PURE__ */ (0,
|
|
934
|
-
"rotate-left": /* @__PURE__ */ (0,
|
|
935
|
-
/* @__PURE__ */ (0,
|
|
936
|
-
/* @__PURE__ */ (0,
|
|
937
|
-
] }),
|
|
938
|
-
"rotate-right": /* @__PURE__ */ (0,
|
|
939
|
-
/* @__PURE__ */ (0,
|
|
940
|
-
/* @__PURE__ */ (0,
|
|
941
|
-
] }),
|
|
942
|
-
download: /* @__PURE__ */ (0,
|
|
943
|
-
upload: /* @__PURE__ */ (0,
|
|
944
|
-
refresh: /* @__PURE__ */ (0,
|
|
945
|
-
/* @__PURE__ */ (0,
|
|
946
|
-
/* @__PURE__ */ (0,
|
|
947
|
-
] }),
|
|
948
|
-
loader: /* @__PURE__ */ (0,
|
|
949
|
-
calendar: /* @__PURE__ */ (0,
|
|
950
|
-
/* @__PURE__ */ (0,
|
|
951
|
-
/* @__PURE__ */ (0,
|
|
952
|
-
] }),
|
|
953
|
-
clock: /* @__PURE__ */ (0,
|
|
954
|
-
/* @__PURE__ */ (0,
|
|
955
|
-
/* @__PURE__ */ (0,
|
|
956
|
-
] }),
|
|
957
|
-
mail: /* @__PURE__ */ (0,
|
|
958
|
-
/* @__PURE__ */ (0,
|
|
959
|
-
/* @__PURE__ */ (0,
|
|
960
|
-
] }),
|
|
961
|
-
phone: /* @__PURE__ */ (0,
|
|
962
|
-
link: /* @__PURE__ */ (0,
|
|
963
|
-
/* @__PURE__ */ (0,
|
|
964
|
-
/* @__PURE__ */ (0,
|
|
965
|
-
] }),
|
|
966
|
-
"external-link": /* @__PURE__ */ (0,
|
|
967
|
-
/* @__PURE__ */ (0,
|
|
968
|
-
/* @__PURE__ */ (0,
|
|
969
|
-
] }),
|
|
970
|
-
eye: /* @__PURE__ */ (0,
|
|
971
|
-
/* @__PURE__ */ (0,
|
|
972
|
-
/* @__PURE__ */ (0,
|
|
973
|
-
] }),
|
|
974
|
-
"eye-off": /* @__PURE__ */ (0,
|
|
975
|
-
lock: /* @__PURE__ */ (0,
|
|
976
|
-
/* @__PURE__ */ (0,
|
|
977
|
-
/* @__PURE__ */ (0,
|
|
978
|
-
] }),
|
|
979
|
-
unlock: /* @__PURE__ */ (0,
|
|
980
|
-
/* @__PURE__ */ (0,
|
|
981
|
-
/* @__PURE__ */ (0,
|
|
982
|
-
] }),
|
|
983
|
-
bell: /* @__PURE__ */ (0,
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
985
|
-
/* @__PURE__ */ (0,
|
|
986
|
-
] }),
|
|
987
|
-
star: /* @__PURE__ */ (0,
|
|
988
|
-
heart: /* @__PURE__ */ (0,
|
|
989
|
-
file: /* @__PURE__ */ (0,
|
|
990
|
-
/* @__PURE__ */ (0,
|
|
991
|
-
/* @__PURE__ */ (0,
|
|
992
|
-
] }),
|
|
993
|
-
folder: /* @__PURE__ */ (0,
|
|
994
|
-
image: /* @__PURE__ */ (0,
|
|
995
|
-
/* @__PURE__ */ (0,
|
|
996
|
-
/* @__PURE__ */ (0,
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
998
|
-
] }),
|
|
999
|
-
filter: /* @__PURE__ */ (0,
|
|
1000
|
-
"sort-ascending": /* @__PURE__ */ (0,
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
1002
|
-
/* @__PURE__ */ (0,
|
|
1003
|
-
] }),
|
|
1004
|
-
"sort-descending": /* @__PURE__ */ (0,
|
|
1005
|
-
/* @__PURE__ */ (0,
|
|
1006
|
-
/* @__PURE__ */ (0,
|
|
1007
|
-
] }),
|
|
1008
|
-
play: /* @__PURE__ */ (0,
|
|
1009
|
-
/* @__PURE__ */ (0,
|
|
1010
|
-
/* @__PURE__ */ (0,
|
|
1011
|
-
] }),
|
|
1012
|
-
pause: /* @__PURE__ */ (0,
|
|
1013
|
-
/* @__PURE__ */ (0,
|
|
1014
|
-
/* @__PURE__ */ (0,
|
|
1015
|
-
] }),
|
|
1016
|
-
book: /* @__PURE__ */ (0,
|
|
1017
|
-
/* @__PURE__ */ (0,
|
|
1018
|
-
/* @__PURE__ */ (0,
|
|
1019
|
-
] }),
|
|
1020
|
-
component: /* @__PURE__ */ (0,
|
|
1021
|
-
/* @__PURE__ */ (0,
|
|
1022
|
-
/* @__PURE__ */ (0,
|
|
1023
|
-
/* @__PURE__ */ (0,
|
|
1024
|
-
/* @__PURE__ */ (0,
|
|
1025
|
-
] }),
|
|
1026
|
-
token: /* @__PURE__ */ (0,
|
|
1027
|
-
/* @__PURE__ */ (0,
|
|
1028
|
-
/* @__PURE__ */ (0,
|
|
1029
|
-
] }),
|
|
1030
|
-
sun: /* @__PURE__ */ (0,
|
|
1031
|
-
/* @__PURE__ */ (0,
|
|
1032
|
-
/* @__PURE__ */ (0,
|
|
1033
|
-
] }),
|
|
1034
|
-
moon: /* @__PURE__ */ (0,
|
|
1035
|
-
code: /* @__PURE__ */ (0,
|
|
1036
|
-
github: /* @__PURE__ */ (0,
|
|
1204
|
+
"flip-horizontal": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3v18M3 6h5v12H3zM16 6h5v12h-5z" }) }),
|
|
1205
|
+
"flip-vertical": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 12h18M6 3h12v5H6zM6 16h12v5H6z" }) }),
|
|
1206
|
+
"rotate-left": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 9a8 8 0 1 1 0 6M4 3v6h6" }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
|
|
1209
|
+
] }),
|
|
1210
|
+
"rotate-right": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M20 9a8 8 0 1 0 0 6M20 3v6h-6" }),
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
|
|
1213
|
+
] }),
|
|
1214
|
+
download: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3v12M7 10l5 5 5-5M4 20h16" }) }),
|
|
1215
|
+
upload: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 16V4M7 9l5-5 5 5M4 20h16" }) }),
|
|
1216
|
+
refresh: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M20 4v4.686h-4.686" }),
|
|
1218
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M20 8.686 17.657 6.343A8 8 0 1 0 20 12" })
|
|
1219
|
+
] }),
|
|
1220
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1" }),
|
|
1221
|
+
calendar: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2.5" }),
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 3v4M16 3v4M3 10h18M7 14h2M11 14h2M15 14h2M7 18h2M11 18h2" })
|
|
1224
|
+
] }),
|
|
1225
|
+
clock: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1227
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 7v5l3.5 2" })
|
|
1228
|
+
] }),
|
|
1229
|
+
mail: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1230
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2.5" }),
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m4 7 8 6 8-6" })
|
|
1232
|
+
] }),
|
|
1233
|
+
phone: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8.2 3.5 5.4 4.8c-1 .5-1.5 1.7-1.1 2.8 2.2 5.9 6.2 9.9 12.1 12.1 1.1.4 2.3-.1 2.8-1.1l1.3-2.8-4.2-2-1.4 2.1c-2.8-1.2-5.6-4-6.8-6.8l2.1-1.4-2-4.2Z" }),
|
|
1234
|
+
link: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m9.5 14.5 5-5" }),
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7.5 16.5 6 18a3.5 3.5 0 0 1-5-5l3-3a3.5 3.5 0 0 1 5 0M16.5 7.5 18 6a3.5 3.5 0 0 1 5 5l-3 3a3.5 3.5 0 0 1-5 0" })
|
|
1237
|
+
] }),
|
|
1238
|
+
"external-link": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1239
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M14 4h6v6M20 4 11 13" }),
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M19 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6" })
|
|
1241
|
+
] }),
|
|
1242
|
+
eye: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z" }),
|
|
1244
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
1245
|
+
] }),
|
|
1246
|
+
"eye-off": /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m3 3 18 18M10.6 6.1A10 10 0 0 1 12 6c6 0 9.5 6 9.5 6a14.5 14.5 0 0 1-2.2 3M6.4 6.4C3.9 8.2 2.5 12 2.5 12s3.5 6 9.5 6a9.7 9.7 0 0 0 3-.5M9.9 9.9a3 3 0 0 0 4.2 4.2" }) }),
|
|
1247
|
+
lock: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "4", y: "10", width: "16", height: "11", rx: "2.5" }),
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 10V7a4 4 0 0 1 8 0v3M12 14v3" })
|
|
1250
|
+
] }),
|
|
1251
|
+
unlock: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "4", y: "10", width: "16", height: "11", rx: "2.5" }),
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 10V7a4 4 0 0 1 7.5-2M12 14v3" })
|
|
1254
|
+
] }),
|
|
1255
|
+
bell: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9Z" }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M10 21h4" })
|
|
1258
|
+
] }),
|
|
1259
|
+
star: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-3-5.6 3 1.1-6.2L3 9.6l6.2-.9L12 3Z" }),
|
|
1260
|
+
heart: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M20.8 5.8a5.5 5.5 0 0 0-7.8 0L12 6.9l-1-1.1a5.5 5.5 0 1 0-7.8 7.8L12 21l8.8-7.4a5.5 5.5 0 0 0 0-7.8Z" }),
|
|
1261
|
+
file: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M6 3h8l4 4v14H6V3Z" }),
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M14 3v5h4" })
|
|
1264
|
+
] }),
|
|
1265
|
+
folder: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 6h7l2 2h9v11H3V6Z" }),
|
|
1266
|
+
image: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1267
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2.5" }),
|
|
1268
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "9", cy: "9", r: "2" }),
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m4 17 4.5-4.5 3.5 3 2.5-2.5 5.5 5" })
|
|
1270
|
+
] }),
|
|
1271
|
+
filter: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 5h18l-7 8v6l-4 2v-8L3 5Z" }),
|
|
1272
|
+
"sort-ascending": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1273
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7 19V5M3.5 8.5 7 5l3.5 3.5" }),
|
|
1274
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M13 7h8M13 12h6M13 17h4" })
|
|
1275
|
+
] }),
|
|
1276
|
+
"sort-descending": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1277
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7 5v14M3.5 15.5 7 19l3.5-3.5" }),
|
|
1278
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M13 7h4M13 12h6M13 17h8" })
|
|
1279
|
+
] }),
|
|
1280
|
+
play: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1282
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m10 8 6 4-6 4V8Z" })
|
|
1283
|
+
] }),
|
|
1284
|
+
pause: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9.5 9v6M14.5 9v6" })
|
|
1287
|
+
] }),
|
|
1288
|
+
book: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 5.5A2.5 2.5 0 0 1 6.5 3H11v17H6.5A2.5 2.5 0 0 0 4 22V5.5Z" }),
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M20 5.5A2.5 2.5 0 0 0 17.5 3H13v17h4.5A2.5 2.5 0 0 1 20 22V5.5Z" })
|
|
1291
|
+
] }),
|
|
1292
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1293
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "4", y: "4", width: "6", height: "6", rx: "1.5" }),
|
|
1294
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "14", y: "4", width: "6", height: "6", rx: "1.5" }),
|
|
1295
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "4", y: "14", width: "6", height: "6", rx: "1.5" }),
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "14", y: "14", width: "6", height: "6", rx: "1.5" })
|
|
1297
|
+
] }),
|
|
1298
|
+
token: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "4" }),
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1" })
|
|
1301
|
+
] }),
|
|
1302
|
+
sun: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1303
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "3.6" }),
|
|
1304
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M18.7 5.3l-1.4 1.4M6.7 17.3l-1.4 1.4" })
|
|
1305
|
+
] }),
|
|
1306
|
+
moon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M20 15.2A8 8 0 0 1 8.8 4 8.5 8.5 0 1 0 20 15.2Z" }),
|
|
1307
|
+
code: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m9 18-6-6 6-6M15 6l6 6-6 6" }),
|
|
1308
|
+
github: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9 19c-4 1.2-4-2-5-2.5M14 22v-3.1c0-.9.3-1.5.8-1.9 2.7-.3 5.5-1.3 5.5-6A4.7 4.7 0 0 0 19 7.7 4.4 4.4 0 0 0 18.9 4S17.8 3.7 15 5.3a11.7 11.7 0 0 0-6 0C6.2 3.7 5.1 4 5.1 4A4.4 4.4 0 0 0 5 7.7 4.7 4.7 0 0 0 3.7 11c0 4.7 2.8 5.7 5.5 6 .5.4.8 1 .8 1.9V22" })
|
|
1037
1309
|
};
|
|
1038
1310
|
var iconPaths = { ...coreIconPaths, ...extendedIconPaths };
|
|
1039
1311
|
var ICON_NAMES = Object.freeze(Object.keys(iconPaths));
|
|
1040
1312
|
var filledIconPaths = {
|
|
1041
|
-
info: /* @__PURE__ */ (0,
|
|
1042
|
-
/* @__PURE__ */ (0,
|
|
1043
|
-
/* @__PURE__ */ (0,
|
|
1044
|
-
] }),
|
|
1045
|
-
question: /* @__PURE__ */ (0,
|
|
1046
|
-
/* @__PURE__ */ (0,
|
|
1047
|
-
/* @__PURE__ */ (0,
|
|
1048
|
-
] }),
|
|
1049
|
-
warning: /* @__PURE__ */ (0,
|
|
1050
|
-
/* @__PURE__ */ (0,
|
|
1051
|
-
/* @__PURE__ */ (0,
|
|
1052
|
-
] }),
|
|
1053
|
-
"circle-check": /* @__PURE__ */ (0,
|
|
1054
|
-
/* @__PURE__ */ (0,
|
|
1055
|
-
/* @__PURE__ */ (0,
|
|
1056
|
-
] }),
|
|
1057
|
-
"circle-close": /* @__PURE__ */ (0,
|
|
1058
|
-
/* @__PURE__ */ (0,
|
|
1059
|
-
/* @__PURE__ */ (0,
|
|
1060
|
-
] }),
|
|
1061
|
-
"circle-plus": /* @__PURE__ */ (0,
|
|
1062
|
-
/* @__PURE__ */ (0,
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
1064
|
-
] }),
|
|
1065
|
-
"circle-minus": /* @__PURE__ */ (0,
|
|
1066
|
-
/* @__PURE__ */ (0,
|
|
1067
|
-
/* @__PURE__ */ (0,
|
|
1068
|
-
] }),
|
|
1069
|
-
home: /* @__PURE__ */ (0,
|
|
1070
|
-
user: /* @__PURE__ */ (0,
|
|
1071
|
-
/* @__PURE__ */ (0,
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1073
|
-
] }),
|
|
1074
|
-
users: /* @__PURE__ */ (0,
|
|
1075
|
-
/* @__PURE__ */ (0,
|
|
1076
|
-
/* @__PURE__ */ (0,
|
|
1077
|
-
/* @__PURE__ */ (0,
|
|
1078
|
-
] }),
|
|
1079
|
-
trash: /* @__PURE__ */ (0,
|
|
1080
|
-
bell: /* @__PURE__ */ (0,
|
|
1081
|
-
star: /* @__PURE__ */ (0,
|
|
1082
|
-
heart: /* @__PURE__ */ (0,
|
|
1083
|
-
mail: /* @__PURE__ */ (0,
|
|
1084
|
-
/* @__PURE__ */ (0,
|
|
1085
|
-
/* @__PURE__ */ (0,
|
|
1086
|
-
] }),
|
|
1087
|
-
lock: /* @__PURE__ */ (0,
|
|
1088
|
-
unlock: /* @__PURE__ */ (0,
|
|
1089
|
-
calendar: /* @__PURE__ */ (0,
|
|
1090
|
-
/* @__PURE__ */ (0,
|
|
1091
|
-
/* @__PURE__ */ (0,
|
|
1092
|
-
] }),
|
|
1093
|
-
clock: /* @__PURE__ */ (0,
|
|
1094
|
-
/* @__PURE__ */ (0,
|
|
1095
|
-
/* @__PURE__ */ (0,
|
|
1096
|
-
] }),
|
|
1097
|
-
file: /* @__PURE__ */ (0,
|
|
1098
|
-
folder: /* @__PURE__ */ (0,
|
|
1099
|
-
image: /* @__PURE__ */ (0,
|
|
1100
|
-
/* @__PURE__ */ (0,
|
|
1101
|
-
/* @__PURE__ */ (0,
|
|
1102
|
-
/* @__PURE__ */ (0,
|
|
1103
|
-
] }),
|
|
1104
|
-
filter: /* @__PURE__ */ (0,
|
|
1105
|
-
play: /* @__PURE__ */ (0,
|
|
1106
|
-
/* @__PURE__ */ (0,
|
|
1107
|
-
/* @__PURE__ */ (0,
|
|
1108
|
-
] }),
|
|
1109
|
-
pause: /* @__PURE__ */ (0,
|
|
1110
|
-
/* @__PURE__ */ (0,
|
|
1111
|
-
/* @__PURE__ */ (0,
|
|
1112
|
-
] }),
|
|
1113
|
-
book: /* @__PURE__ */ (0,
|
|
1114
|
-
component: /* @__PURE__ */ (0,
|
|
1115
|
-
/* @__PURE__ */ (0,
|
|
1116
|
-
/* @__PURE__ */ (0,
|
|
1117
|
-
/* @__PURE__ */ (0,
|
|
1118
|
-
/* @__PURE__ */ (0,
|
|
1119
|
-
] }),
|
|
1120
|
-
token: /* @__PURE__ */ (0,
|
|
1121
|
-
/* @__PURE__ */ (0,
|
|
1122
|
-
/* @__PURE__ */ (0,
|
|
1313
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 10.5v6M12 7.2v.1", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1316
|
+
] }),
|
|
1317
|
+
question: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1318
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1319
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9.6 9a2.5 2.5 0 1 1 3.6 2.3c-.8.5-1.2 1.1-1.2 2.1M12 16.8v.1", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1320
|
+
] }),
|
|
1321
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1322
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M10.3 3.5 1.8 19a2 2 0 0 0 1.8 3h16.8a2 2 0 0 0 1.8-3L13.7 3.5a2 2 0 0 0-3.4 0Z", fill: "currentColor", stroke: "none" }),
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 9v5M12 18v.1", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1324
|
+
] }),
|
|
1325
|
+
"circle-check": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1327
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m7.5 12 3 3 6-6", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1328
|
+
] }),
|
|
1329
|
+
"circle-close": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1330
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1331
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m8.8 8.8 6.4 6.4M15.2 8.8l-6.4 6.4", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1332
|
+
] }),
|
|
1333
|
+
"circle-plus": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1335
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 7.5v9M7.5 12h9", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1336
|
+
] }),
|
|
1337
|
+
"circle-minus": /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1338
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7.5 12h9", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1340
|
+
] }),
|
|
1341
|
+
home: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.6 10.8 12 2.8l9.4 8a1 1 0 0 1-1.3 1.5l-.6-.5V21h-5.2v-6.2H9.7V21H4.5v-9.2l-.6.5a1 1 0 1 1-1.3-1.5Z", fill: "currentColor", stroke: "none" }),
|
|
1342
|
+
user: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1343
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "7.5", r: "4.5", fill: "currentColor", stroke: "none" }),
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3.5 21c.7-5 3.6-7.5 8.5-7.5s7.8 2.5 8.5 7.5H3.5Z", fill: "currentColor", stroke: "none" })
|
|
1345
|
+
] }),
|
|
1346
|
+
users: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "8.5", cy: "8", r: "3.8", fill: "currentColor", stroke: "none" }),
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "17", cy: "8.5", r: "3", fill: "currentColor", stroke: "none", opacity: ".7" }),
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M1.8 21c.6-4.6 2.8-7 6.7-7s6.1 2.4 6.7 7H1.8ZM14.4 15.2c3.9-.2 6.4 1.7 7 5.8h-4.5a9.9 9.9 0 0 0-2.5-5.8Z", fill: "currentColor", stroke: "none" })
|
|
1350
|
+
] }),
|
|
1351
|
+
trash: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 3h8l1 3h4v2H3V6h4l1-3Zm-2.5 7h13l-1 11h-11l-1-11Z", fill: "currentColor", stroke: "none" }),
|
|
1352
|
+
bell: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 2.5a2 2 0 0 1 2 1.6c3 .9 5 3.6 5 6.9v4.3l2 3.2H3l2-3.2V11c0-3.3 2-6 5-6.9a2 2 0 0 1 2-1.6ZM9.2 20h5.6a3 3 0 0 1-5.6 0Z", fill: "currentColor", stroke: "none" }),
|
|
1353
|
+
star: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m12 2.2 3 6 6.6 1-4.8 4.6 1.1 6.6-5.9-3.1-5.9 3.1 1.1-6.6-4.8-4.6 6.6-1 3-6Z", fill: "currentColor", stroke: "none" }),
|
|
1354
|
+
heart: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 21.3 3.1 13.7A5.8 5.8 0 0 1 11 5.2l1 1 1-1a5.8 5.8 0 0 1 7.9 8.5L12 21.3Z", fill: "currentColor", stroke: "none" }),
|
|
1355
|
+
mail: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "2.5", y: "4.5", width: "19", height: "15", rx: "2.5", fill: "currentColor", stroke: "none" }),
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m4.5 7 7.5 5.8L19.5 7", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "1.8" })
|
|
1358
|
+
] }),
|
|
1359
|
+
lock: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7 10V7a5 5 0 0 1 10 0v3h1.5a2.5 2.5 0 0 1 2.5 2.5v7a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 19.5v-7A2.5 2.5 0 0 1 5.5 10H7Zm2.5 0h5V7a2.5 2.5 0 0 0-5 0v3Z", fill: "currentColor", stroke: "none" }),
|
|
1360
|
+
unlock: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7 10V7a5 5 0 0 1 9.5-2.2l-2.2 1.1A2.5 2.5 0 0 0 9.5 7v3h9A2.5 2.5 0 0 1 21 12.5v7a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 19.5v-7A2.5 2.5 0 0 1 5.5 10H7Z", fill: "currentColor", stroke: "none" }),
|
|
1361
|
+
calendar: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "2.5", y: "4.5", width: "19", height: "17", rx: "2.5", fill: "currentColor", stroke: "none" }),
|
|
1363
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 9.5h18M8 2.5v4M16 2.5v4", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "1.8" })
|
|
1364
|
+
] }),
|
|
1365
|
+
clock: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 6.5V12l4 2.3", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
1368
|
+
] }),
|
|
1369
|
+
file: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M5 2.5h10l4 4V22H5V2.5Zm9 1.8V8h3.7L14 4.3Z", fill: "currentColor", stroke: "none" }),
|
|
1370
|
+
folder: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.5 5h7l2.2 2.5h9.8V20H2.5V5Z", fill: "currentColor", stroke: "none" }),
|
|
1371
|
+
image: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "2.5", y: "3.5", width: "19", height: "17", rx: "2.5", fill: "currentColor", stroke: "none" }),
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m4.5 18 4.3-4.6 3.4 3 2.5-2.6 4.8 4.2", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "1.7" }),
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "8", cy: "8.5", r: "1.7", fill: "var(--sia-icon-contrast, #fff)", stroke: "none" })
|
|
1375
|
+
] }),
|
|
1376
|
+
filter: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2 4h20l-7.8 9v6.2L9.8 22v-9L2 4Z", fill: "currentColor", stroke: "none" }),
|
|
1377
|
+
play: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1378
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1379
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m10 7.8 6.5 4.2-6.5 4.2V7.8Z", fill: "var(--sia-icon-contrast, #fff)", stroke: "none" })
|
|
1380
|
+
] }),
|
|
1381
|
+
pause: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1382
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
1383
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8.5 7.5h2.5v9H8.5v-9Zm4.5 0h2.5v9H13v-9Z", fill: "var(--sia-icon-contrast, #fff)", stroke: "none" })
|
|
1384
|
+
] }),
|
|
1385
|
+
book: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 4.5A3.5 3.5 0 0 1 6.5 1H11v19H6.5A3.5 3.5 0 0 0 3 23V4.5ZM21 4.5A3.5 3.5 0 0 0 17.5 1H13v19h4.5A3.5 3.5 0 0 1 21 23V4.5Z", fill: "currentColor", stroke: "none" }),
|
|
1386
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "3", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" }),
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "13", y: "3", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" }),
|
|
1389
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "13", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" }),
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "13", y: "13", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" })
|
|
1391
|
+
] }),
|
|
1392
|
+
token: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "5", fill: "currentColor", stroke: "none" }),
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 1v4M12 19v4M1 12h4M19 12h4M4.2 4.2 7 7M17 17l2.8 2.8M19.8 4.2 17 7M7 17l-2.8 2.8", stroke: "currentColor", strokeWidth: "2.2" })
|
|
1123
1395
|
] })
|
|
1124
1396
|
};
|
|
1125
1397
|
var FILLED_ICON_NAMES = Object.freeze(Object.keys(filledIconPaths));
|
|
1126
|
-
var
|
|
1398
|
+
var normalizedOutlinePaths = normalizeIconPaths(iconPaths, outlineIconBounds);
|
|
1399
|
+
var normalizedFilledPaths = normalizeIconPaths(filledIconPaths, filledIconBounds);
|
|
1400
|
+
var Icon = (0, import_react4.forwardRef)(function Icon2({ name, size = "1em", strokeWidth = 1.8, rotate = 0, spin = false, pulse = false, label, variant = "outline", className = "", style, ...props }, ref) {
|
|
1127
1401
|
const resolvedSize = typeof size === "number" ? `${size}px` : size;
|
|
1128
1402
|
const mergedStyle = { "--sia-icon-size": resolvedSize, "--sia-icon-rotate": `${rotate}deg`, ...style };
|
|
1129
1403
|
const animationClass = spin ? " sia-icon--spin" : pulse ? " sia-icon--pulse" : "";
|
|
1130
1404
|
const filledPath = filledIconPaths[name];
|
|
1131
1405
|
const resolvedVariant = variant === "filled" && filledPath ? "filled" : "outline";
|
|
1132
|
-
|
|
1406
|
+
const geometry = resolvedVariant === "filled" ? normalizedFilledPaths[name] : normalizedOutlinePaths[name];
|
|
1407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1133
1408
|
"span",
|
|
1134
1409
|
{
|
|
1135
1410
|
ref,
|
|
@@ -1140,23 +1415,23 @@ var Icon = (0, import_react3.forwardRef)(function Icon2({ name, size = "1em", st
|
|
|
1140
1415
|
"aria-hidden": label ? void 0 : true,
|
|
1141
1416
|
style: mergedStyle,
|
|
1142
1417
|
...withTitleTooltip(props),
|
|
1143
|
-
children: /* @__PURE__ */ (0,
|
|
1418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: strokeWidth / geometry.scale, strokeLinecap: "round", strokeLinejoin: "round", focusable: "false", children: geometry.node })
|
|
1144
1419
|
}
|
|
1145
1420
|
);
|
|
1146
1421
|
});
|
|
1147
1422
|
|
|
1148
1423
|
// src/components/DatePickerPanel.tsx
|
|
1149
|
-
var
|
|
1424
|
+
var import_react7 = require("react");
|
|
1150
1425
|
|
|
1151
1426
|
// src/components/FloatingScrollbarProvider.tsx
|
|
1152
|
-
var
|
|
1427
|
+
var import_react6 = require("react");
|
|
1153
1428
|
|
|
1154
1429
|
// src/components/useScrollbarProximity.ts
|
|
1155
|
-
var
|
|
1430
|
+
var import_react5 = require("react");
|
|
1156
1431
|
var users = 0;
|
|
1157
1432
|
var cleanup;
|
|
1158
1433
|
function useScrollbarProximity() {
|
|
1159
|
-
(0,
|
|
1434
|
+
(0, import_react5.useEffect)(() => {
|
|
1160
1435
|
if (users++ === 0) {
|
|
1161
1436
|
let frame = 0;
|
|
1162
1437
|
let x = -Infinity;
|
|
@@ -1277,7 +1552,7 @@ function createTrack(axis) {
|
|
|
1277
1552
|
}
|
|
1278
1553
|
function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
1279
1554
|
useScrollbarProximity();
|
|
1280
|
-
(0,
|
|
1555
|
+
(0, import_react6.useEffect)(() => {
|
|
1281
1556
|
if (disabled) return;
|
|
1282
1557
|
const layer = document.createElement("div");
|
|
1283
1558
|
layer.className = "sia-floating-scrollbar-layer";
|
|
@@ -1537,7 +1812,7 @@ function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
|
1537
1812
|
}
|
|
1538
1813
|
|
|
1539
1814
|
// src/components/DatePickerPanel.tsx
|
|
1540
|
-
var
|
|
1815
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1541
1816
|
function pad(value) {
|
|
1542
1817
|
return String(value).padStart(2, "0");
|
|
1543
1818
|
}
|
|
@@ -1602,9 +1877,9 @@ function CalendarMonth({
|
|
|
1602
1877
|
const end = range[1] || previewEnd || "";
|
|
1603
1878
|
const low = start && end ? start <= end ? start : end : "";
|
|
1604
1879
|
const high = start && end ? start <= end ? end : start : "";
|
|
1605
|
-
return /* @__PURE__ */ (0,
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1607
|
-
/* @__PURE__ */ (0,
|
|
1880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "sia-date-panel__month", children: [
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "sia-date-panel__weekdays", "aria-hidden": "true", children: WEEKDAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: day }, day)) }),
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "sia-date-panel__days", children: Array.from({ length: 42 }, (_, index) => {
|
|
1608
1883
|
const date = addDays(gridStart, index);
|
|
1609
1884
|
const key = dateKey(date);
|
|
1610
1885
|
const outside = date.getMonth() !== month.getMonth();
|
|
@@ -1613,11 +1888,11 @@ function CalendarMonth({
|
|
|
1613
1888
|
const rangeStart = Boolean(start && key === start);
|
|
1614
1889
|
const rangeEnd = Boolean(range[1] && key === range[1]);
|
|
1615
1890
|
const inRange = Boolean(low && high && key >= low && key <= high);
|
|
1616
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1617
1892
|
"span",
|
|
1618
1893
|
{
|
|
1619
1894
|
className: `sia-date-panel__cell${outside ? " is-outside" : ""}${selected ? " is-selected" : ""}${rangeStart ? " is-range-start" : ""}${rangeEnd ? " is-range-end" : ""}${inRange ? " is-in-range" : ""}${key === today ? " is-today" : ""}`,
|
|
1620
|
-
children: /* @__PURE__ */ (0,
|
|
1895
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1621
1896
|
"button",
|
|
1622
1897
|
{
|
|
1623
1898
|
type: "button",
|
|
@@ -1644,28 +1919,28 @@ function CalendarHeader({
|
|
|
1644
1919
|
onNextMonth,
|
|
1645
1920
|
onNextYear
|
|
1646
1921
|
}) {
|
|
1647
|
-
return /* @__PURE__ */ (0,
|
|
1648
|
-
/* @__PURE__ */ (0,
|
|
1649
|
-
onPreviousYear ? /* @__PURE__ */ (0,
|
|
1650
|
-
/* @__PURE__ */ (0,
|
|
1651
|
-
/* @__PURE__ */ (0,
|
|
1922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "sia-date-panel__header", children: [
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "sia-date-panel__nav", children: [
|
|
1924
|
+
onPreviousYear ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", "aria-label": "\u4E0A\u4E00\u5E74", onClick: onPreviousYear, children: [
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron-left", size: 13 }),
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron-left", size: 13 })
|
|
1652
1927
|
] }) : null,
|
|
1653
|
-
onPreviousMonth ? /* @__PURE__ */ (0,
|
|
1928
|
+
onPreviousMonth ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": "\u4E0A\u4E2A\u6708", onClick: onPreviousMonth, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron-left", size: 15 }) }) : null
|
|
1654
1929
|
] }),
|
|
1655
|
-
/* @__PURE__ */ (0,
|
|
1656
|
-
label ? /* @__PURE__ */ (0,
|
|
1657
|
-
/* @__PURE__ */ (0,
|
|
1930
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("strong", { children: [
|
|
1931
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: label }) : null,
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
|
|
1658
1933
|
month.getFullYear(),
|
|
1659
1934
|
"\u5E74\xA0 ",
|
|
1660
1935
|
month.getMonth() + 1,
|
|
1661
1936
|
"\u6708"
|
|
1662
1937
|
] })
|
|
1663
1938
|
] }),
|
|
1664
|
-
/* @__PURE__ */ (0,
|
|
1665
|
-
onNextMonth ? /* @__PURE__ */ (0,
|
|
1666
|
-
onNextYear ? /* @__PURE__ */ (0,
|
|
1667
|
-
/* @__PURE__ */ (0,
|
|
1668
|
-
/* @__PURE__ */ (0,
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "sia-date-panel__nav", children: [
|
|
1940
|
+
onNextMonth ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": "\u4E0B\u4E2A\u6708", onClick: onNextMonth, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron-right", size: 15 }) }) : null,
|
|
1941
|
+
onNextYear ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", "aria-label": "\u4E0B\u4E00\u5E74", onClick: onNextYear, children: [
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron-right", size: 13 }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron-right", size: 13 })
|
|
1669
1944
|
] }) : null
|
|
1670
1945
|
] }),
|
|
1671
1946
|
range ? null : null
|
|
@@ -1680,12 +1955,12 @@ function TimePanel({
|
|
|
1680
1955
|
onChange
|
|
1681
1956
|
}) {
|
|
1682
1957
|
const [hour = "00", minute = "00", second = "00"] = value.split(":");
|
|
1683
|
-
const columnsRef = (0,
|
|
1684
|
-
const hourRef = (0,
|
|
1685
|
-
const minuteRef = (0,
|
|
1686
|
-
const secondRef = (0,
|
|
1958
|
+
const columnsRef = (0, import_react7.useRef)(null);
|
|
1959
|
+
const hourRef = (0, import_react7.useRef)(null);
|
|
1960
|
+
const minuteRef = (0, import_react7.useRef)(null);
|
|
1961
|
+
const secondRef = (0, import_react7.useRef)(null);
|
|
1687
1962
|
const columnRefs = [hourRef, minuteRef, secondRef];
|
|
1688
|
-
(0,
|
|
1963
|
+
(0, import_react7.useLayoutEffect)(() => {
|
|
1689
1964
|
for (const column of columnsRef.current?.children ?? []) {
|
|
1690
1965
|
const selected = column.querySelector('[aria-selected="true"]');
|
|
1691
1966
|
const first = column.firstElementChild;
|
|
@@ -1707,19 +1982,19 @@ function TimePanel({
|
|
|
1707
1982
|
values[index] = next;
|
|
1708
1983
|
onChange(values.join(":"));
|
|
1709
1984
|
}
|
|
1710
|
-
return /* @__PURE__ */ (0,
|
|
1711
|
-
/* @__PURE__ */ (0,
|
|
1985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("aside", { className: "sia-date-panel__time", "aria-label": ariaLabel, children: [
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("strong", { children: [
|
|
1712
1987
|
use12Hours ? pad(Number(hour) % 12 || 12) : hour,
|
|
1713
1988
|
":",
|
|
1714
1989
|
minute,
|
|
1715
1990
|
showSecond ? `:${second}` : "",
|
|
1716
1991
|
use12Hours ? Number(hour) < 12 ? " AM" : " PM" : ""
|
|
1717
1992
|
] }),
|
|
1718
|
-
/* @__PURE__ */ (0,
|
|
1993
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref: columnsRef, className: "sia-date-panel__time-columns", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref: columnRefs[column.index], role: "listbox", "aria-label": `${ariaLabel}${column.label}`, children: Array.from({ length: column.count }, (_, index) => {
|
|
1719
1994
|
const next = pad(index);
|
|
1720
1995
|
const candidate = [hour, minute, second];
|
|
1721
1996
|
candidate[column.index] = next;
|
|
1722
|
-
return /* @__PURE__ */ (0,
|
|
1997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", disabled: disabledTime?.(candidate.join(":")), "aria-selected": next === column.value, className: next === column.value ? "is-selected" : "", onKeyDown: (event) => {
|
|
1723
1998
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) return;
|
|
1724
1999
|
event.preventDefault();
|
|
1725
2000
|
const buttons = Array.from(event.currentTarget.parentElement.querySelectorAll("button:not(:disabled)"));
|
|
@@ -1728,7 +2003,7 @@ function TimePanel({
|
|
|
1728
2003
|
buttons[target]?.focus();
|
|
1729
2004
|
}, onClick: () => update(column.index, next), children: use12Hours && column.index === 0 ? `${pad(index % 12 || 12)} ${index < 12 ? "AM" : "PM"}` : next }, next);
|
|
1730
2005
|
}) }, column.label)) }),
|
|
1731
|
-
columns.map((column) => /* @__PURE__ */ (0,
|
|
2006
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FloatingScrollbarProvider, { targetRef: columnRefs[column.index] }, column.index))
|
|
1732
2007
|
] });
|
|
1733
2008
|
}
|
|
1734
2009
|
function DatePanelFooter({
|
|
@@ -1740,17 +2015,17 @@ function DatePanelFooter({
|
|
|
1740
2015
|
onToday,
|
|
1741
2016
|
onConfirm
|
|
1742
2017
|
}) {
|
|
1743
|
-
return /* @__PURE__ */ (0,
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
1745
|
-
showToday ? /* @__PURE__ */ (0,
|
|
2018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("footer", { className: "sia-date-panel__footer", children: [
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
|
|
2020
|
+
showToday ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", onClick: onToday, children: "\u6B64\u523B" }) : null,
|
|
1746
2021
|
extra
|
|
1747
2022
|
] }),
|
|
1748
|
-
needConfirm ? /* @__PURE__ */ (0,
|
|
2023
|
+
needConfirm ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "sia-date-panel__confirm", disabled: disabledConfirm, onClick: onConfirm, children: confirmText }) : null
|
|
1749
2024
|
] });
|
|
1750
2025
|
}
|
|
1751
2026
|
|
|
1752
2027
|
// src/components/DatePicker.tsx
|
|
1753
|
-
var
|
|
2028
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1754
2029
|
function formatWeek(date) {
|
|
1755
2030
|
const target = new Date(date);
|
|
1756
2031
|
target.setHours(0, 0, 0, 0);
|
|
@@ -1826,23 +2101,23 @@ function DatePicker({
|
|
|
1826
2101
|
...props
|
|
1827
2102
|
}) {
|
|
1828
2103
|
const size = useControlSize(sizeProp);
|
|
1829
|
-
const id = (0,
|
|
1830
|
-
const rootRef = (0,
|
|
1831
|
-
const popupRef = (0,
|
|
2104
|
+
const id = (0, import_react8.useId)();
|
|
2105
|
+
const rootRef = (0, import_react8.useRef)(null);
|
|
2106
|
+
const popupRef = (0, import_react8.useRef)(null);
|
|
1832
2107
|
const initialValue = defaultValue ?? (multiple ? [] : "");
|
|
1833
2108
|
const [currentValue, setCurrentValue] = useControllableState({ value, defaultValue: initialValue, onChange });
|
|
1834
2109
|
const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
|
|
1835
|
-
const [draftValue, setDraftValue] = (0,
|
|
2110
|
+
const [draftValue, setDraftValue] = (0, import_react8.useState)(currentValue);
|
|
1836
2111
|
const firstCurrent = Array.isArray(currentValue) ? currentValue[0] : currentValue;
|
|
1837
|
-
const [viewMonth, setViewMonth] = (0,
|
|
1838
|
-
const [draftTime, setDraftTime] = (0,
|
|
2112
|
+
const [viewMonth, setViewMonth] = (0, import_react8.useState)(() => startOfMonth(parseDate(dayFromValue(firstCurrent)) ?? /* @__PURE__ */ new Date()));
|
|
2113
|
+
const [draftTime, setDraftTime] = (0, import_react8.useState)(() => timePart(firstCurrent, defaultTimeFrom(showTime)));
|
|
1839
2114
|
const resolvedNeedConfirm = needConfirm ?? Boolean(showTime);
|
|
1840
2115
|
const showSecond = showSecondFrom(showTime);
|
|
1841
|
-
const selectedDates = (0,
|
|
2116
|
+
const selectedDates = (0, import_react8.useMemo)(() => {
|
|
1842
2117
|
const values = Array.isArray(draftValue) ? draftValue : draftValue ? [draftValue] : [];
|
|
1843
2118
|
return values.map(dayFromValue).filter(Boolean);
|
|
1844
2119
|
}, [draftValue]);
|
|
1845
|
-
(0,
|
|
2120
|
+
(0, import_react8.useEffect)(() => {
|
|
1846
2121
|
if (!visible) return void 0;
|
|
1847
2122
|
const close = (event) => {
|
|
1848
2123
|
const target = event.target;
|
|
@@ -1903,8 +2178,8 @@ function DatePicker({
|
|
|
1903
2178
|
const display = Array.isArray(currentValue) ? currentValue.map(formatValue).join("\u3001") : currentValue ? formatValue(currentValue) : "";
|
|
1904
2179
|
const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder: placeholder ?? placeholderFor(picker, showTime, multiple), filled: Boolean(display), active: visible });
|
|
1905
2180
|
const triggerLabel = props["aria-label"] ?? (typeof placeholder === "string" ? placeholder : "\u65E5\u671F\u9009\u62E9\u5668");
|
|
1906
|
-
return /* @__PURE__ */ (0,
|
|
1907
|
-
/* @__PURE__ */ (0,
|
|
2181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { ref: rootRef, className: `sia-picker${floating.className} sia-picker--${size} sia-picker--${status}${visible ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
|
|
2182
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1908
2183
|
"button",
|
|
1909
2184
|
{
|
|
1910
2185
|
type: "button",
|
|
@@ -1926,16 +2201,16 @@ function DatePicker({
|
|
|
1926
2201
|
} else if (event.key === "Escape") changeOpen(false);
|
|
1927
2202
|
},
|
|
1928
2203
|
children: [
|
|
1929
|
-
/* @__PURE__ */ (0,
|
|
1930
|
-
/* @__PURE__ */ (0,
|
|
2204
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `sia-picker__value${display ? "" : " is-placeholder"}`, children: display || placeholder || placeholderFor(picker, showTime, multiple) }),
|
|
2205
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sia-picker__icon", "aria-hidden": "true", children: suffixIcon ?? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "calendar", size: 16 }) })
|
|
1931
2206
|
]
|
|
1932
2207
|
}
|
|
1933
2208
|
),
|
|
1934
2209
|
floating.label,
|
|
1935
|
-
allowClear && display && !disabled ? /* @__PURE__ */ (0,
|
|
1936
|
-
/* @__PURE__ */ (0,
|
|
1937
|
-
/* @__PURE__ */ (0,
|
|
1938
|
-
presets?.length ? /* @__PURE__ */ (0,
|
|
2210
|
+
allowClear && display && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "sia-picker__clear", "aria-label": "\u6E05\u9664\u65E5\u671F", onClick: clearValue, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: visible, className: `sia-date-panel${showTime ? " sia-date-panel--with-time" : ""}${presets?.length ? " sia-date-panel--with-presets" : ""}`, role: "dialog", "aria-label": "\u65E5\u671F\u9009\u62E9\u9762\u677F", children: [
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "sia-date-panel__body", children: [
|
|
2213
|
+
presets?.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("aside", { className: "sia-date-panel__presets", children: presets.map((preset2, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => {
|
|
1939
2214
|
const next = resolvePreset(preset2.value);
|
|
1940
2215
|
if (!next || isDisabled(dayFromValue(next))) return;
|
|
1941
2216
|
setDraftValue(next);
|
|
@@ -1944,8 +2219,8 @@ function DatePicker({
|
|
|
1944
2219
|
changeOpen(false);
|
|
1945
2220
|
}
|
|
1946
2221
|
}, children: preset2.label }, index)) }) : null,
|
|
1947
|
-
/* @__PURE__ */ (0,
|
|
1948
|
-
/* @__PURE__ */ (0,
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "sia-date-panel__calendar", children: [
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1949
2224
|
CalendarHeader,
|
|
1950
2225
|
{
|
|
1951
2226
|
month: viewMonth,
|
|
@@ -1955,14 +2230,14 @@ function DatePicker({
|
|
|
1955
2230
|
onNextYear: () => setViewMonth(addMonths(viewMonth, 12))
|
|
1956
2231
|
}
|
|
1957
2232
|
),
|
|
1958
|
-
/* @__PURE__ */ (0,
|
|
2233
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CalendarMonth, { month: viewMonth, selectedDates, disabledDate: isDisabled, onSelect: selectDate })
|
|
1959
2234
|
] }),
|
|
1960
|
-
showTime ? /* @__PURE__ */ (0,
|
|
2235
|
+
showTime ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TimePanel, { value: draftTime, showSecond, onChange: (next) => {
|
|
1961
2236
|
setDraftTime(next);
|
|
1962
2237
|
if (typeof draftValue === "string" && draftValue) setDraftValue(withTime(dayFromValue(draftValue), next, showSecond));
|
|
1963
2238
|
} }) : null
|
|
1964
2239
|
] }),
|
|
1965
|
-
/* @__PURE__ */ (0,
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1966
2241
|
DatePanelFooter,
|
|
1967
2242
|
{
|
|
1968
2243
|
extra: renderExtraFooter?.(),
|
|
@@ -2016,15 +2291,15 @@ function DateRangePicker({
|
|
|
2016
2291
|
...props
|
|
2017
2292
|
}) {
|
|
2018
2293
|
const size = useControlSize(sizeProp);
|
|
2019
|
-
const id = (0,
|
|
2020
|
-
const rootRef = (0,
|
|
2021
|
-
const popupRef = (0,
|
|
2294
|
+
const id = (0, import_react8.useId)();
|
|
2295
|
+
const rootRef = (0, import_react8.useRef)(null);
|
|
2296
|
+
const popupRef = (0, import_react8.useRef)(null);
|
|
2022
2297
|
const [currentValue, setCurrentValue] = useControllableState({ value: value === void 0 ? void 0 : Array.isArray(value) ? value : ["", ""], defaultValue, onChange });
|
|
2023
2298
|
const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
|
|
2024
|
-
const [draftValue, setDraftValue] = (0,
|
|
2025
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
2026
|
-
const indicatorRef = (0,
|
|
2027
|
-
(0,
|
|
2299
|
+
const [draftValue, setDraftValue] = (0, import_react8.useState)(currentValue);
|
|
2300
|
+
const [activeIndex, setActiveIndex] = (0, import_react8.useState)(endpointDisabled[0] || currentValue[0] && !currentValue[1] ? 1 : 0);
|
|
2301
|
+
const indicatorRef = (0, import_react8.useRef)(null);
|
|
2302
|
+
(0, import_react8.useLayoutEffect)(() => {
|
|
2028
2303
|
const field = rootRef.current?.querySelector(`[data-range-endpoint="${activeIndex}"]`);
|
|
2029
2304
|
const indicator = indicatorRef.current;
|
|
2030
2305
|
if (!field || !indicator) return;
|
|
@@ -2041,22 +2316,22 @@ function DateRangePicker({
|
|
|
2041
2316
|
}
|
|
2042
2317
|
return () => observer.disconnect();
|
|
2043
2318
|
});
|
|
2044
|
-
const [confirmedIndex, setConfirmedIndex] = (0,
|
|
2045
|
-
const [presetSelected, setPresetSelected] = (0,
|
|
2046
|
-
const [hoverDate, setHoverDate] = (0,
|
|
2047
|
-
const [viewMonth, setViewMonth] = (0,
|
|
2048
|
-
const [endViewMonth, setEndViewMonth] = (0,
|
|
2319
|
+
const [confirmedIndex, setConfirmedIndex] = (0, import_react8.useState)(null);
|
|
2320
|
+
const [presetSelected, setPresetSelected] = (0, import_react8.useState)(false);
|
|
2321
|
+
const [hoverDate, setHoverDate] = (0, import_react8.useState)("");
|
|
2322
|
+
const [viewMonth, setViewMonth] = (0, import_react8.useState)(() => startOfMonth(parseDate(dayFromValue(currentValue[0] || currentValue[1])) ?? /* @__PURE__ */ new Date()));
|
|
2323
|
+
const [endViewMonth, setEndViewMonth] = (0, import_react8.useState)(() => startOfMonth(parseDate(dayFromValue(currentValue[1])) ?? addMonths(parseDate(dayFromValue(currentValue[0])) ?? /* @__PURE__ */ new Date(), 1)));
|
|
2049
2324
|
const showSecond = showSecondFrom(showTime);
|
|
2050
2325
|
const defaultTime = defaultTimeFrom(showTime);
|
|
2051
2326
|
const defaultEndTime = defaultTimeFrom(showTime, 1);
|
|
2052
|
-
const [times, setTimes] = (0,
|
|
2327
|
+
const [times, setTimes] = (0, import_react8.useState)([
|
|
2053
2328
|
timePart(currentValue[0], defaultTime),
|
|
2054
2329
|
timePart(currentValue[1], defaultEndTime)
|
|
2055
2330
|
]);
|
|
2056
2331
|
const resolvedNeedConfirm = needConfirm ?? Boolean(showTime);
|
|
2057
2332
|
const rangeDates = [dayFromValue(draftValue[0]), dayFromValue(draftValue[1])];
|
|
2058
2333
|
const invalidDateTimeRange = Boolean(showTime && draftValue[0] && draftValue[1] && draftValue[0] > draftValue[1]);
|
|
2059
|
-
(0,
|
|
2334
|
+
(0, import_react8.useEffect)(() => {
|
|
2060
2335
|
if (!visible) return void 0;
|
|
2061
2336
|
const close = (event) => {
|
|
2062
2337
|
const target = event.target;
|
|
@@ -2229,14 +2504,14 @@ function DateRangePicker({
|
|
|
2229
2504
|
const month = index === 0 ? viewMonth : endViewMonth;
|
|
2230
2505
|
const setMonth = index === 0 ? setViewMonth : setEndViewMonth;
|
|
2231
2506
|
const endpointLabel = index === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F";
|
|
2232
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2233
2508
|
"div",
|
|
2234
2509
|
{
|
|
2235
2510
|
className: `sia-date-panel__range-date-time-group${activeIndex === index ? " is-active" : ""}`,
|
|
2236
2511
|
"aria-label": `${endpointLabel}\u65E5\u671F\u65F6\u95F4`,
|
|
2237
2512
|
children: [
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2239
|
-
/* @__PURE__ */ (0,
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "sia-date-panel__calendar", children: [
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2240
2515
|
CalendarHeader,
|
|
2241
2516
|
{
|
|
2242
2517
|
month,
|
|
@@ -2248,7 +2523,7 @@ function DateRangePicker({
|
|
|
2248
2523
|
onNextYear: () => setMonth(addMonths(month, 12))
|
|
2249
2524
|
}
|
|
2250
2525
|
),
|
|
2251
|
-
/* @__PURE__ */ (0,
|
|
2526
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2252
2527
|
CalendarMonth,
|
|
2253
2528
|
{
|
|
2254
2529
|
month,
|
|
@@ -2258,7 +2533,7 @@ function DateRangePicker({
|
|
|
2258
2533
|
}
|
|
2259
2534
|
)
|
|
2260
2535
|
] }),
|
|
2261
|
-
/* @__PURE__ */ (0,
|
|
2536
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2262
2537
|
TimePanel,
|
|
2263
2538
|
{
|
|
2264
2539
|
value: times[index],
|
|
@@ -2276,8 +2551,8 @@ function DateRangePicker({
|
|
|
2276
2551
|
const displayValue = visible && allowEmpty.some(Boolean) ? draftValue : currentValue;
|
|
2277
2552
|
const startFloating = useFloatingPlaceholder({ mode: placeholderMode, placeholder: placeholder[0], filled: Boolean(displayValue[0]), active: visible });
|
|
2278
2553
|
const endFloating = useFloatingPlaceholder({ mode: placeholderMode, placeholder: placeholder[1], filled: Boolean(displayValue[1]), active: visible });
|
|
2279
|
-
return /* @__PURE__ */ (0,
|
|
2280
|
-
/* @__PURE__ */ (0,
|
|
2554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { ref: rootRef, className: `sia-picker sia-picker-range-control sia-picker--${size} sia-picker--${status}${visible ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
|
|
2555
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2281
2556
|
"button",
|
|
2282
2557
|
{
|
|
2283
2558
|
type: "button",
|
|
@@ -2301,27 +2576,27 @@ function DateRangePicker({
|
|
|
2301
2576
|
else changeOpen(true);
|
|
2302
2577
|
},
|
|
2303
2578
|
children: [
|
|
2304
|
-
/* @__PURE__ */ (0,
|
|
2305
|
-
/* @__PURE__ */ (0,
|
|
2579
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-range-endpoint": "0", className: `sia-picker-range-control__field${startFloating.className}${visible && activeIndex === 0 ? " is-active" : ""}`, children: [
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `sia-picker-range-control__value${displayValue[0] ? "" : " is-placeholder"}`, children: displayValue[0] ? formatValue(displayValue[0]) : placeholder[0] }),
|
|
2306
2581
|
startFloating.label
|
|
2307
2582
|
] }),
|
|
2308
|
-
/* @__PURE__ */ (0,
|
|
2309
|
-
/* @__PURE__ */ (0,
|
|
2310
|
-
/* @__PURE__ */ (0,
|
|
2583
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sia-picker-range-control__separator", children: separator }),
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-range-endpoint": "1", className: `sia-picker-range-control__field${endFloating.className}${visible && activeIndex === 1 ? " is-active" : ""}`, children: [
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `sia-picker-range-control__value${displayValue[1] ? "" : " is-placeholder"}`, children: displayValue[1] ? formatValue(displayValue[1]) : placeholder[1] }),
|
|
2311
2586
|
endFloating.label
|
|
2312
2587
|
] }),
|
|
2313
|
-
/* @__PURE__ */ (0,
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2588
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { ref: indicatorRef, className: "sia-picker-range-control__indicator", "aria-hidden": "true" }),
|
|
2589
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sia-picker__icon", "aria-hidden": "true", children: suffixIcon ?? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "calendar", size: 16 }) })
|
|
2315
2590
|
]
|
|
2316
2591
|
}
|
|
2317
2592
|
),
|
|
2318
|
-
allowClear && (displayValue[0] || displayValue[1]) && !disabled ? /* @__PURE__ */ (0,
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2320
|
-
/* @__PURE__ */ (0,
|
|
2321
|
-
presets?.length ? /* @__PURE__ */ (0,
|
|
2322
|
-
showTime ? /* @__PURE__ */ (0,
|
|
2323
|
-
/* @__PURE__ */ (0,
|
|
2324
|
-
/* @__PURE__ */ (0,
|
|
2593
|
+
allowClear && (displayValue[0] || displayValue[1]) && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "sia-picker__clear", "aria-label": "\u6E05\u9664\u65E5\u671F\u8303\u56F4", onClick: clearValue, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
|
|
2594
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: visible, className: `sia-date-panel sia-date-panel--range${showTime ? " sia-date-panel--with-time sia-date-panel--range-time-compact" : ""}${presets?.length ? " sia-date-panel--with-presets" : ""}`, role: "dialog", "aria-label": "\u65E5\u671F\u8303\u56F4\u9009\u62E9\u9762\u677F", children: [
|
|
2595
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "sia-date-panel__body", children: [
|
|
2596
|
+
presets?.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("aside", { className: "sia-date-panel__presets", "aria-label": "\u5FEB\u6377\u65E5\u671F\u8303\u56F4", children: presets.map((preset2, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => applyPreset(preset2), children: preset2.label }, index)) }) : null,
|
|
2597
|
+
showTime ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "sia-date-panel__range-date-time", children: renderDateTimeGroup(activeIndex) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "sia-date-panel__range-calendars", children: [
|
|
2598
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "sia-date-panel__calendar", children: [
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2325
2600
|
CalendarHeader,
|
|
2326
2601
|
{
|
|
2327
2602
|
month: viewMonth,
|
|
@@ -2330,10 +2605,10 @@ function DateRangePicker({
|
|
|
2330
2605
|
onPreviousMonth: () => setViewMonth(addMonths(viewMonth, -1))
|
|
2331
2606
|
}
|
|
2332
2607
|
),
|
|
2333
|
-
/* @__PURE__ */ (0,
|
|
2608
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CalendarMonth, { month: viewMonth, range: rangeDates, previewEnd: activeIndex === 1 ? hoverDate : "", disabledDate: isDisabled, onSelect: selectDate, onHover: activeIndex === 1 ? setHoverDate : void 0 })
|
|
2334
2609
|
] }),
|
|
2335
|
-
/* @__PURE__ */ (0,
|
|
2336
|
-
/* @__PURE__ */ (0,
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "sia-date-panel__calendar", children: [
|
|
2611
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2337
2612
|
CalendarHeader,
|
|
2338
2613
|
{
|
|
2339
2614
|
month: addMonths(viewMonth, 1),
|
|
@@ -2342,19 +2617,19 @@ function DateRangePicker({
|
|
|
2342
2617
|
onNextYear: () => setViewMonth(addMonths(viewMonth, 12))
|
|
2343
2618
|
}
|
|
2344
2619
|
),
|
|
2345
|
-
/* @__PURE__ */ (0,
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CalendarMonth, { month: addMonths(viewMonth, 1), range: rangeDates, previewEnd: activeIndex === 1 ? hoverDate : "", disabledDate: isDisabled, onSelect: selectDate, onHover: activeIndex === 1 ? setHoverDate : void 0 })
|
|
2346
2621
|
] })
|
|
2347
2622
|
] })
|
|
2348
2623
|
] }),
|
|
2349
|
-
/* @__PURE__ */ (0,
|
|
2624
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2350
2625
|
DatePanelFooter,
|
|
2351
2626
|
{
|
|
2352
2627
|
showToday: showToday && !presets?.length,
|
|
2353
2628
|
needConfirm: Boolean(showTime) || resolvedNeedConfirm || allowEmpty.some(Boolean),
|
|
2354
2629
|
disabledConfirm: needsOtherConfirmation ? !draftValue[activeIndex] && !allowEmpty[activeIndex] : !isValidRange(draftValue),
|
|
2355
|
-
extra: /* @__PURE__ */ (0,
|
|
2630
|
+
extra: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
2356
2631
|
renderExtraFooter?.(),
|
|
2357
|
-
invalidDateTimeRange ? /* @__PURE__ */ (0,
|
|
2632
|
+
invalidDateTimeRange ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { className: "sia-date-panel__range-error", children: "\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u65E9\u4E8E\u5F00\u59CB\u65F6\u95F4" }) : maxRangeDays ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("small", { children: [
|
|
2358
2633
|
"\u6700\u591A\u9009\u62E9 ",
|
|
2359
2634
|
maxRangeDays,
|
|
2360
2635
|
" \u5929"
|
|
@@ -2384,16 +2659,16 @@ function DateRangePicker({
|
|
|
2384
2659
|
})(DatePicker || (DatePicker = {}));
|
|
2385
2660
|
|
|
2386
2661
|
// src/components/Select.tsx
|
|
2387
|
-
var
|
|
2662
|
+
var import_react18 = require("react");
|
|
2388
2663
|
|
|
2389
2664
|
// src/components/Modal.tsx
|
|
2390
|
-
var
|
|
2665
|
+
var import_react11 = require("react");
|
|
2391
2666
|
var import_client2 = require("react-dom/client");
|
|
2392
2667
|
|
|
2393
2668
|
// src/components/Button.tsx
|
|
2394
|
-
var
|
|
2395
|
-
var
|
|
2396
|
-
var Button = (0,
|
|
2669
|
+
var import_react9 = require("react");
|
|
2670
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2671
|
+
var Button = (0, import_react9.forwardRef)(function Button2({
|
|
2397
2672
|
variant = "default",
|
|
2398
2673
|
size: sizeProp,
|
|
2399
2674
|
loading = false,
|
|
@@ -2409,7 +2684,7 @@ var Button = (0, import_react8.forwardRef)(function Button2({
|
|
|
2409
2684
|
...props
|
|
2410
2685
|
}, forwardedRef) {
|
|
2411
2686
|
const size = useControlSize(sizeProp);
|
|
2412
|
-
const localRef = (0,
|
|
2687
|
+
const localRef = (0, import_react9.useRef)(null);
|
|
2413
2688
|
function setRef(node) {
|
|
2414
2689
|
localRef.current = node;
|
|
2415
2690
|
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
@@ -2427,7 +2702,7 @@ var Button = (0, import_react8.forwardRef)(function Button2({
|
|
|
2427
2702
|
onClick?.(event);
|
|
2428
2703
|
}
|
|
2429
2704
|
const mergedStyle = block ? { ...style, width: "100%" } : style ?? {};
|
|
2430
|
-
return /* @__PURE__ */ (0,
|
|
2705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2431
2706
|
"button",
|
|
2432
2707
|
{
|
|
2433
2708
|
ref: setRef,
|
|
@@ -2439,16 +2714,16 @@ var Button = (0, import_react8.forwardRef)(function Button2({
|
|
|
2439
2714
|
style: mergedStyle,
|
|
2440
2715
|
...withTitleTooltip(props),
|
|
2441
2716
|
children: [
|
|
2442
|
-
loading ? /* @__PURE__ */ (0,
|
|
2443
|
-
children !== void 0 && children !== null ? /* @__PURE__ */ (0,
|
|
2444
|
-
!loading && icon && iconPosition === "end" ? /* @__PURE__ */ (0,
|
|
2717
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sia-button__spinner", "aria-hidden": "true" }) : icon && iconPosition === "start" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sia-button__icon", children: icon }) : null,
|
|
2718
|
+
children !== void 0 && children !== null ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children }) : null,
|
|
2719
|
+
!loading && icon && iconPosition === "end" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sia-button__icon", children: icon }) : null
|
|
2445
2720
|
]
|
|
2446
2721
|
}
|
|
2447
2722
|
);
|
|
2448
2723
|
});
|
|
2449
2724
|
|
|
2450
2725
|
// src/components/Overlay.tsx
|
|
2451
|
-
var
|
|
2726
|
+
var import_react10 = require("react");
|
|
2452
2727
|
var import_react_dom2 = require("react-dom");
|
|
2453
2728
|
var bodyLockCount = 0;
|
|
2454
2729
|
var previousBodyOverflow = "";
|
|
@@ -2470,10 +2745,10 @@ function focusableElements(container) {
|
|
|
2470
2745
|
)].filter((element) => !element.hidden && element.getAttribute("aria-hidden") !== "true");
|
|
2471
2746
|
}
|
|
2472
2747
|
function useOverlayLifecycle(open, panelRef, onRequestClose, keyboard = true) {
|
|
2473
|
-
const overlayIdRef = (0,
|
|
2474
|
-
const closeRef = (0,
|
|
2748
|
+
const overlayIdRef = (0, import_react10.useRef)(/* @__PURE__ */ Symbol("sia-overlay"));
|
|
2749
|
+
const closeRef = (0, import_react10.useRef)(onRequestClose);
|
|
2475
2750
|
closeRef.current = onRequestClose;
|
|
2476
|
-
(0,
|
|
2751
|
+
(0, import_react10.useEffect)(() => {
|
|
2477
2752
|
if (!open || typeof document === "undefined") return void 0;
|
|
2478
2753
|
const overlayId = overlayIdRef.current;
|
|
2479
2754
|
const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -2527,17 +2802,17 @@ function OverlayPortal({ children, container }) {
|
|
|
2527
2802
|
}
|
|
2528
2803
|
|
|
2529
2804
|
// src/components/Modal.tsx
|
|
2530
|
-
var
|
|
2805
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2531
2806
|
var modalHandles = /* @__PURE__ */ new Set();
|
|
2532
2807
|
var MODAL_MOTION_DURATION = 220;
|
|
2533
2808
|
var typeIcons = {
|
|
2534
|
-
info: /* @__PURE__ */ (0,
|
|
2535
|
-
success: /* @__PURE__ */ (0,
|
|
2536
|
-
warning: /* @__PURE__ */ (0,
|
|
2537
|
-
error: /* @__PURE__ */ (0,
|
|
2538
|
-
confirm: /* @__PURE__ */ (0,
|
|
2809
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "info", size: 23 }),
|
|
2810
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "circle-check", size: 23 }),
|
|
2811
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "warning", size: 23 }),
|
|
2812
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "circle-close", size: 23 }),
|
|
2813
|
+
confirm: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "question", size: 23 })
|
|
2539
2814
|
};
|
|
2540
|
-
var ModalRoot = (0,
|
|
2815
|
+
var ModalRoot = (0, import_react11.forwardRef)(function Modal({
|
|
2541
2816
|
open,
|
|
2542
2817
|
title,
|
|
2543
2818
|
children,
|
|
@@ -2566,20 +2841,20 @@ var ModalRoot = (0, import_react10.forwardRef)(function Modal({
|
|
|
2566
2841
|
style,
|
|
2567
2842
|
...props
|
|
2568
2843
|
}, forwardedRef) {
|
|
2569
|
-
const localRef = (0,
|
|
2570
|
-
const titleId = (0,
|
|
2571
|
-
const [submitting, setSubmitting] = (0,
|
|
2572
|
-
const [rendered, setRendered] = (0,
|
|
2573
|
-
const [closing, setClosing] = (0,
|
|
2574
|
-
const afterOpenChangeRef = (0,
|
|
2844
|
+
const localRef = (0, import_react11.useRef)(null);
|
|
2845
|
+
const titleId = (0, import_react11.useId)();
|
|
2846
|
+
const [submitting, setSubmitting] = (0, import_react11.useState)(false);
|
|
2847
|
+
const [rendered, setRendered] = (0, import_react11.useState)(open);
|
|
2848
|
+
const [closing, setClosing] = (0, import_react11.useState)(false);
|
|
2849
|
+
const afterOpenChangeRef = (0, import_react11.useRef)(afterOpenChange);
|
|
2575
2850
|
afterOpenChangeRef.current = afterOpenChange;
|
|
2576
|
-
const submitLock = (0,
|
|
2577
|
-
(0,
|
|
2851
|
+
const submitLock = (0, import_react11.useRef)(false);
|
|
2852
|
+
(0, import_react11.useEffect)(() => {
|
|
2578
2853
|
if (!open || !rendered) return void 0;
|
|
2579
2854
|
const timer = window.setTimeout(() => afterOpenChangeRef.current?.(true), MODAL_MOTION_DURATION);
|
|
2580
2855
|
return () => window.clearTimeout(timer);
|
|
2581
2856
|
}, [open, rendered]);
|
|
2582
|
-
(0,
|
|
2857
|
+
(0, import_react11.useEffect)(() => {
|
|
2583
2858
|
if (open) {
|
|
2584
2859
|
setRendered(true);
|
|
2585
2860
|
setClosing(false);
|
|
@@ -2636,11 +2911,11 @@ var ModalRoot = (0, import_react10.forwardRef)(function Modal({
|
|
|
2636
2911
|
"--sia-modal-width": typeof width === "number" ? `${width}px` : width
|
|
2637
2912
|
};
|
|
2638
2913
|
const loading = submitting || confirmLoading;
|
|
2639
|
-
const defaultFooter = /* @__PURE__ */ (0,
|
|
2640
|
-
showCancel ? /* @__PURE__ */ (0,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2914
|
+
const defaultFooter = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
2915
|
+
showCancel ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { ...cancelButtonProps, onClick: requestClose, disabled: loading || cancelButtonProps?.disabled, children: cancelText }) : null,
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { variant: "primary", ...okButtonProps, onClick: handleOk, loading, children: okText })
|
|
2642
2917
|
] });
|
|
2643
|
-
return /* @__PURE__ */ (0,
|
|
2918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(OverlayPortal, { container: getContainer, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2644
2919
|
"div",
|
|
2645
2920
|
{
|
|
2646
2921
|
className: `sia-modal-root${centered ? " sia-modal-root--centered" : ""}`,
|
|
@@ -2649,7 +2924,7 @@ var ModalRoot = (0, import_react10.forwardRef)(function Modal({
|
|
|
2649
2924
|
onMouseDown: (event) => {
|
|
2650
2925
|
if (event.target === event.currentTarget && maskClosable) requestClose();
|
|
2651
2926
|
},
|
|
2652
|
-
children: /* @__PURE__ */ (0,
|
|
2927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2653
2928
|
"div",
|
|
2654
2929
|
{
|
|
2655
2930
|
ref: setRef,
|
|
@@ -2661,16 +2936,16 @@ var ModalRoot = (0, import_react10.forwardRef)(function Modal({
|
|
|
2661
2936
|
tabIndex: -1,
|
|
2662
2937
|
...withTitleTooltip(props),
|
|
2663
2938
|
children: [
|
|
2664
|
-
/* @__PURE__ */ (0,
|
|
2665
|
-
/* @__PURE__ */ (0,
|
|
2666
|
-
typeIcons[type] ? /* @__PURE__ */ (0,
|
|
2667
|
-
title ? /* @__PURE__ */ (0,
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "sia-modal__header", style: height !== void 0 ? { flexShrink: 0 } : void 0, children: [
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "sia-modal__heading", children: [
|
|
2941
|
+
typeIcons[type] ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sia-modal__type-icon", "aria-hidden": "true", children: typeIcons[type] }) : null,
|
|
2942
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { id: titleId, children: title }) : null
|
|
2668
2943
|
] }),
|
|
2669
|
-
closable ? /* @__PURE__ */ (0,
|
|
2944
|
+
closable ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", className: "sia-modal__close", "aria-label": "\u5173\u95ED\u5BF9\u8BDD\u6846", onClick: requestClose, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "close", size: 17 }) }) : null
|
|
2670
2945
|
] }),
|
|
2671
|
-
children !== void 0 ? /* @__PURE__ */ (0,
|
|
2672
|
-
footer !== null ? /* @__PURE__ */ (0,
|
|
2673
|
-
footer === void 0 && footerExtra != null ? /* @__PURE__ */ (0,
|
|
2946
|
+
children !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "sia-modal__body", style: height !== void 0 ? { flex: 1, minHeight: 0, overflow: "auto" } : void 0, children }) : null,
|
|
2947
|
+
footer !== null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "sia-modal__footer", style: height !== void 0 ? { flexShrink: 0 } : void 0, children: [
|
|
2948
|
+
footer === void 0 && footerExtra != null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { marginRight: "auto" }, children: footerExtra }) : null,
|
|
2674
2949
|
footer ?? defaultFooter
|
|
2675
2950
|
] }) : null
|
|
2676
2951
|
]
|
|
@@ -2704,11 +2979,11 @@ function openModal(config) {
|
|
|
2704
2979
|
render();
|
|
2705
2980
|
}
|
|
2706
2981
|
function ModalInstance() {
|
|
2707
|
-
(0,
|
|
2982
|
+
(0, import_react11.useEffect)(() => {
|
|
2708
2983
|
mounted = true;
|
|
2709
2984
|
if (!currentOpen) render();
|
|
2710
2985
|
}, []);
|
|
2711
|
-
return /* @__PURE__ */ (0,
|
|
2986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ModalRoot, { ...currentConfig, open: !mounted || currentOpen, onOpenChange: (nextOpen) => {
|
|
2712
2987
|
currentConfig.onOpenChange?.(nextOpen);
|
|
2713
2988
|
if (!nextOpen) closeWithMotion();
|
|
2714
2989
|
}, afterOpenChange: (nextOpen) => {
|
|
@@ -2720,7 +2995,7 @@ function openModal(config) {
|
|
|
2720
2995
|
} });
|
|
2721
2996
|
}
|
|
2722
2997
|
function render() {
|
|
2723
|
-
root.render(/* @__PURE__ */ (0,
|
|
2998
|
+
root.render(/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ModalInstance, {}));
|
|
2724
2999
|
}
|
|
2725
3000
|
const handle = {
|
|
2726
3001
|
destroy: closeWithMotion,
|
|
@@ -2765,12 +3040,12 @@ var Modal2 = Object.assign(ModalRoot, {
|
|
|
2765
3040
|
});
|
|
2766
3041
|
|
|
2767
3042
|
// src/components/Input.tsx
|
|
2768
|
-
var
|
|
3043
|
+
var import_react13 = require("react");
|
|
2769
3044
|
|
|
2770
3045
|
// src/components/TextArea.tsx
|
|
2771
|
-
var
|
|
2772
|
-
var
|
|
2773
|
-
var TextArea = (0,
|
|
3046
|
+
var import_react12 = require("react");
|
|
3047
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3048
|
+
var TextArea = (0, import_react12.forwardRef)(function TextArea2({
|
|
2774
3049
|
label,
|
|
2775
3050
|
hint,
|
|
2776
3051
|
status = "default",
|
|
@@ -2788,9 +3063,9 @@ var TextArea = (0, import_react11.forwardRef)(function TextArea2({
|
|
|
2788
3063
|
...props
|
|
2789
3064
|
}, ref) {
|
|
2790
3065
|
const size = useControlSize(sizeProp);
|
|
2791
|
-
const fallbackId = (0,
|
|
3066
|
+
const fallbackId = (0, import_react12.useId)();
|
|
2792
3067
|
const textAreaId = id ?? fallbackId;
|
|
2793
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
3068
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react12.useState)(() => defaultValue === void 0 ? "" : String(defaultValue));
|
|
2794
3069
|
const currentText = value !== void 0 ? String(value) : uncontrolledValue;
|
|
2795
3070
|
const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: currentText.length > 0 });
|
|
2796
3071
|
const hintId = `${textAreaId}-hint`;
|
|
@@ -2799,8 +3074,8 @@ var TextArea = (0, import_react11.forwardRef)(function TextArea2({
|
|
|
2799
3074
|
setUncontrolledValue(event.target.value);
|
|
2800
3075
|
onChange?.(event);
|
|
2801
3076
|
}
|
|
2802
|
-
const control = /* @__PURE__ */ (0,
|
|
2803
|
-
/* @__PURE__ */ (0,
|
|
3077
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: `sia-textarea-control sia-textarea-control--${size} sia-textarea-control--${status}${floating.className}${disabled ? " is-disabled" : ""}`, children: [
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2804
3079
|
"textarea",
|
|
2805
3080
|
{
|
|
2806
3081
|
...withTitleTooltip(props),
|
|
@@ -2818,22 +3093,22 @@ var TextArea = (0, import_react11.forwardRef)(function TextArea2({
|
|
|
2818
3093
|
}
|
|
2819
3094
|
),
|
|
2820
3095
|
floating.label,
|
|
2821
|
-
showCount ? /* @__PURE__ */ (0,
|
|
3096
|
+
showCount ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: `sia-textarea-control__count${maxLength !== void 0 && currentText.length >= maxLength ? " is-limit" : ""}`, "aria-live": "polite", children: [
|
|
2822
3097
|
currentText.length,
|
|
2823
3098
|
maxLength !== void 0 ? `/${maxLength}` : null
|
|
2824
3099
|
] }) : null
|
|
2825
3100
|
] });
|
|
2826
|
-
if (!label && !hint) return /* @__PURE__ */ (0,
|
|
2827
|
-
return /* @__PURE__ */ (0,
|
|
2828
|
-
label ? /* @__PURE__ */ (0,
|
|
3101
|
+
if (!label && !hint) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: `sia-field ${className}`.trim(), children: control });
|
|
3102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: `sia-field ${className}`.trim(), children: [
|
|
3103
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { className: "sia-field__label", htmlFor: textAreaId, children: label }) : null,
|
|
2829
3104
|
control,
|
|
2830
|
-
hint ? /* @__PURE__ */ (0,
|
|
3105
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { id: hintId, className: `sia-field__hint sia-field__hint--${status}`, children: hint }) : null
|
|
2831
3106
|
] });
|
|
2832
3107
|
});
|
|
2833
3108
|
|
|
2834
3109
|
// src/components/Input.tsx
|
|
2835
|
-
var
|
|
2836
|
-
var Input = (0,
|
|
3110
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
3111
|
+
var Input = (0, import_react13.forwardRef)(function Input2({
|
|
2837
3112
|
label,
|
|
2838
3113
|
hint,
|
|
2839
3114
|
status = "default",
|
|
@@ -2856,14 +3131,14 @@ var Input = (0, import_react12.forwardRef)(function Input2({
|
|
|
2856
3131
|
...props
|
|
2857
3132
|
}, forwardedRef) {
|
|
2858
3133
|
const size = useControlSize(sizeProp);
|
|
2859
|
-
const fallbackId = (0,
|
|
3134
|
+
const fallbackId = (0, import_react13.useId)();
|
|
2860
3135
|
const inputId = id ?? fallbackId;
|
|
2861
|
-
const localRef = (0,
|
|
2862
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
3136
|
+
const localRef = (0, import_react13.useRef)(null);
|
|
3137
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react13.useState)(() => defaultValue === void 0 ? "" : String(defaultValue));
|
|
2863
3138
|
const currentText = value !== void 0 ? String(value) : uncontrolledValue;
|
|
2864
3139
|
const hasValue = currentText.length > 0;
|
|
2865
|
-
const [expanded, setExpanded] = (0,
|
|
2866
|
-
const [expandedDraft, setExpandedDraft] = (0,
|
|
3140
|
+
const [expanded, setExpanded] = (0, import_react13.useState)(false);
|
|
3141
|
+
const [expandedDraft, setExpandedDraft] = (0, import_react13.useState)("");
|
|
2867
3142
|
const floatingPlaceholder = usePlaceholderMode(placeholderMode) === "floating" && Boolean(placeholder);
|
|
2868
3143
|
const hintId = `${inputId}-hint`;
|
|
2869
3144
|
const describedBy = [props["aria-describedby"], hint ? hintId : null].filter(Boolean).join(" ") || void 0;
|
|
@@ -2899,7 +3174,7 @@ var Input = (0, import_react12.forwardRef)(function Input2({
|
|
|
2899
3174
|
event.preventDefault();
|
|
2900
3175
|
localRef.current?.focus({ preventScroll: true });
|
|
2901
3176
|
}
|
|
2902
|
-
const input = /* @__PURE__ */ (0,
|
|
3177
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2903
3178
|
"input",
|
|
2904
3179
|
{
|
|
2905
3180
|
...withTitleTooltip(props),
|
|
@@ -2916,15 +3191,15 @@ var Input = (0, import_react12.forwardRef)(function Input2({
|
|
|
2916
3191
|
onChange: handleChange
|
|
2917
3192
|
}
|
|
2918
3193
|
);
|
|
2919
|
-
const control = /* @__PURE__ */ (0,
|
|
2920
|
-
prefix ? /* @__PURE__ */ (0,
|
|
2921
|
-
floatingPlaceholder ? /* @__PURE__ */ (0,
|
|
3194
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { onMouseDown: handleControlMouseDown, className: `sia-input-control sia-input-control--${size} sia-input-control--${status}${floatingPlaceholder ? " sia-input-control--floating" : ""}${floatingPlaceholder && hasValue ? " is-filled" : ""}${disabled ? " is-disabled" : ""}`, children: [
|
|
3195
|
+
prefix ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-input-control__affix", children: prefix }) : null,
|
|
3196
|
+
floatingPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "sia-input-control__input-wrap", children: [
|
|
2922
3197
|
input,
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
3198
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-input-control__floating-placeholder", "aria-hidden": "true", children: placeholder })
|
|
2924
3199
|
] }) : input,
|
|
2925
|
-
allowClear && hasValue && !disabled ? /* @__PURE__ */ (0,
|
|
2926
|
-
suffix ? /* @__PURE__ */ (0,
|
|
2927
|
-
expandable && !disabled && !props.readOnly && (!props.type || props.type === "text") ? /* @__PURE__ */ (0,
|
|
3200
|
+
allowClear && hasValue && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { className: "sia-input-control__clear", type: "button", "aria-label": "\u6E05\u7A7A\u8F93\u5165", onClick: clearValue, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
|
|
3201
|
+
suffix ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-input-control__affix", children: suffix }) : null,
|
|
3202
|
+
expandable && !disabled && !props.readOnly && (!props.type || props.type === "text") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2928
3203
|
"button",
|
|
2929
3204
|
{
|
|
2930
3205
|
type: "button",
|
|
@@ -2936,15 +3211,15 @@ var Input = (0, import_react12.forwardRef)(function Input2({
|
|
|
2936
3211
|
setExpandedDraft(currentText);
|
|
2937
3212
|
setExpanded(true);
|
|
2938
3213
|
},
|
|
2939
|
-
children: /* @__PURE__ */ (0,
|
|
3214
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { name: "expand", size: 15 })
|
|
2940
3215
|
}
|
|
2941
3216
|
) : null,
|
|
2942
|
-
showCount ? /* @__PURE__ */ (0,
|
|
3217
|
+
showCount ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: `sia-input-control__count${maxLength !== void 0 && currentText.length >= maxLength ? " is-limit" : ""}`, "aria-live": "polite", children: [
|
|
2943
3218
|
currentText.length,
|
|
2944
3219
|
maxLength !== void 0 ? `/${maxLength}` : null
|
|
2945
3220
|
] }) : null
|
|
2946
3221
|
] });
|
|
2947
|
-
const editor = expandable ? /* @__PURE__ */ (0,
|
|
3222
|
+
const editor = expandable ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2948
3223
|
Modal2,
|
|
2949
3224
|
{
|
|
2950
3225
|
open: expanded,
|
|
@@ -2965,7 +3240,7 @@ var Input = (0, import_react12.forwardRef)(function Input2({
|
|
|
2965
3240
|
setUncontrolledValue(next);
|
|
2966
3241
|
setExpanded(false);
|
|
2967
3242
|
},
|
|
2968
|
-
children: /* @__PURE__ */ (0,
|
|
3243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2969
3244
|
TextArea,
|
|
2970
3245
|
{
|
|
2971
3246
|
"aria-label": "\u5C55\u5F00\u7F16\u8F91\u5185\u5BB9",
|
|
@@ -2981,32 +3256,32 @@ var Input = (0, import_react12.forwardRef)(function Input2({
|
|
|
2981
3256
|
)
|
|
2982
3257
|
}
|
|
2983
3258
|
) : null;
|
|
2984
|
-
if (!label && !hint) return /* @__PURE__ */ (0,
|
|
2985
|
-
/* @__PURE__ */ (0,
|
|
3259
|
+
if (!label && !hint) return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: `sia-field ${className}`.trim(), children: control }),
|
|
2986
3261
|
editor
|
|
2987
3262
|
] });
|
|
2988
|
-
return /* @__PURE__ */ (0,
|
|
2989
|
-
/* @__PURE__ */ (0,
|
|
2990
|
-
label ? /* @__PURE__ */ (0,
|
|
3263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
3264
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: `sia-field ${className}`.trim(), children: [
|
|
3265
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { className: "sia-field__label", htmlFor: inputId, children: label }) : null,
|
|
2991
3266
|
control,
|
|
2992
|
-
hint ? /* @__PURE__ */ (0,
|
|
3267
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { id: hintId, className: `sia-field__hint sia-field__hint--${status}`, children: hint }) : null
|
|
2993
3268
|
] }),
|
|
2994
3269
|
editor
|
|
2995
3270
|
] });
|
|
2996
3271
|
});
|
|
2997
3272
|
|
|
2998
3273
|
// src/components/Checkbox.tsx
|
|
2999
|
-
var
|
|
3000
|
-
var
|
|
3001
|
-
var CheckboxGroupContext = (0,
|
|
3002
|
-
var CheckboxRoot = (0,
|
|
3274
|
+
var import_react14 = require("react");
|
|
3275
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3276
|
+
var CheckboxGroupContext = (0, import_react14.createContext)(null);
|
|
3277
|
+
var CheckboxRoot = (0, import_react14.forwardRef)(function Checkbox({ value, size: sizeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
|
|
3003
3278
|
const size = useControlSize(sizeProp);
|
|
3004
|
-
const group = (0,
|
|
3005
|
-
const localRef = (0,
|
|
3006
|
-
const fallbackId = (0,
|
|
3279
|
+
const group = (0, import_react14.useContext)(CheckboxGroupContext);
|
|
3280
|
+
const localRef = (0, import_react14.useRef)(null);
|
|
3281
|
+
const fallbackId = (0, import_react14.useId)();
|
|
3007
3282
|
const grouped = group !== null && value !== void 0;
|
|
3008
3283
|
const currentChecked = grouped ? group.values.includes(value) : checked;
|
|
3009
|
-
(0,
|
|
3284
|
+
(0, import_react14.useEffect)(() => {
|
|
3010
3285
|
if (localRef.current) localRef.current.indeterminate = indeterminate;
|
|
3011
3286
|
}, [indeterminate]);
|
|
3012
3287
|
function setRef(node) {
|
|
@@ -3014,8 +3289,8 @@ var CheckboxRoot = (0, import_react13.forwardRef)(function Checkbox({ value, siz
|
|
|
3014
3289
|
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
3015
3290
|
else if (forwardedRef) forwardedRef.current = node;
|
|
3016
3291
|
}
|
|
3017
|
-
return /* @__PURE__ */ (0,
|
|
3018
|
-
/* @__PURE__ */ (0,
|
|
3292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: `sia-checkbox sia-checkbox--${size}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
|
|
3293
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3019
3294
|
"input",
|
|
3020
3295
|
{
|
|
3021
3296
|
...withTitleTooltip(props),
|
|
@@ -3034,8 +3309,8 @@ var CheckboxRoot = (0, import_react13.forwardRef)(function Checkbox({ value, siz
|
|
|
3034
3309
|
}
|
|
3035
3310
|
}
|
|
3036
3311
|
),
|
|
3037
|
-
/* @__PURE__ */ (0,
|
|
3038
|
-
children !== void 0 ? /* @__PURE__ */ (0,
|
|
3312
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sia-checkbox__control", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", {}) }),
|
|
3313
|
+
children !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sia-checkbox__label", children }) : null
|
|
3039
3314
|
] });
|
|
3040
3315
|
});
|
|
3041
3316
|
function CheckboxGroup({
|
|
@@ -3059,7 +3334,7 @@ function CheckboxGroup({
|
|
|
3059
3334
|
gap: gap === void 0 ? void 0 : typeof gap === "number" ? Math.max(0, gap) : `${Math.max(0, gap[0])}px ${Math.max(0, gap[1])}px`
|
|
3060
3335
|
};
|
|
3061
3336
|
const [values, setValues] = useControllableState({ value, defaultValue, onChange });
|
|
3062
|
-
const context = (0,
|
|
3337
|
+
const context = (0, import_react14.useMemo)(() => ({
|
|
3063
3338
|
values,
|
|
3064
3339
|
disabled,
|
|
3065
3340
|
name,
|
|
@@ -3068,10 +3343,10 @@ function CheckboxGroup({
|
|
|
3068
3343
|
setValues(next);
|
|
3069
3344
|
}
|
|
3070
3345
|
}), [disabled, name, setValues, values]);
|
|
3071
|
-
return /* @__PURE__ */ (0,
|
|
3346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `sia-checkbox-group${gridColumns ? " sia-checkbox-group--grid" : direction === "vertical" ? " sia-checkbox-group--vertical" : ""} ${className}`.trim(), style: layoutStyle, role: "group", children: [
|
|
3072
3347
|
options?.map((option) => {
|
|
3073
3348
|
const normalized = typeof option === "object" ? option : { label: String(option), value: option };
|
|
3074
|
-
return /* @__PURE__ */ (0,
|
|
3349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckboxRoot, { value: normalized.value, disabled: normalized.disabled, children: normalized.label }, normalized.value);
|
|
3075
3350
|
}),
|
|
3076
3351
|
children
|
|
3077
3352
|
] }) }) });
|
|
@@ -3082,12 +3357,12 @@ var Checkbox2 = Object.assign(CheckboxRoot, {
|
|
|
3082
3357
|
});
|
|
3083
3358
|
|
|
3084
3359
|
// src/components/SelectionPanel.tsx
|
|
3085
|
-
var
|
|
3360
|
+
var import_react16 = require("react");
|
|
3086
3361
|
|
|
3087
3362
|
// src/components/FloatingDisplay.tsx
|
|
3088
|
-
var
|
|
3363
|
+
var import_react15 = require("react");
|
|
3089
3364
|
var import_react_dom3 = require("react-dom");
|
|
3090
|
-
var
|
|
3365
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3091
3366
|
var FLOATING_GAP = 9;
|
|
3092
3367
|
var FLOATING_VIEWPORT_PADDING = 8;
|
|
3093
3368
|
var FLOATING_ARROW_EDGE_OFFSET = 16;
|
|
@@ -3172,23 +3447,23 @@ function Floating({
|
|
|
3172
3447
|
role = "tooltip",
|
|
3173
3448
|
onOpenChange
|
|
3174
3449
|
}) {
|
|
3175
|
-
const rootRef = (0,
|
|
3176
|
-
const triggerElementRef = (0,
|
|
3177
|
-
const overlayRef = (0,
|
|
3178
|
-
const enterTimer = (0,
|
|
3179
|
-
const leaveTimer = (0,
|
|
3180
|
-
const contentId = (0,
|
|
3450
|
+
const rootRef = (0, import_react15.useRef)(null);
|
|
3451
|
+
const triggerElementRef = (0, import_react15.useRef)(null);
|
|
3452
|
+
const overlayRef = (0, import_react15.useRef)(null);
|
|
3453
|
+
const enterTimer = (0, import_react15.useRef)();
|
|
3454
|
+
const leaveTimer = (0, import_react15.useRef)();
|
|
3455
|
+
const contentId = (0, import_react15.useId)();
|
|
3181
3456
|
const triggers = Array.isArray(trigger) ? trigger : [trigger];
|
|
3182
3457
|
const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
|
|
3183
|
-
const [position, setPosition] = (0,
|
|
3184
|
-
const [portalContainer, setPortalContainer] = (0,
|
|
3185
|
-
(0,
|
|
3458
|
+
const [position, setPosition] = (0, import_react15.useState)();
|
|
3459
|
+
const [portalContainer, setPortalContainer] = (0, import_react15.useState)(null);
|
|
3460
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
3186
3461
|
if (!visible) return;
|
|
3187
3462
|
setPortalContainer(rootRef.current?.closest(".sia-modal-root, .sia-drawer-root") ?? document.body);
|
|
3188
3463
|
});
|
|
3189
|
-
const setVisibleRef = (0,
|
|
3464
|
+
const setVisibleRef = (0, import_react15.useRef)(setVisible);
|
|
3190
3465
|
setVisibleRef.current = setVisible;
|
|
3191
|
-
const closeSelfRef = (0,
|
|
3466
|
+
const closeSelfRef = (0, import_react15.useRef)();
|
|
3192
3467
|
if (!closeSelfRef.current) closeSelfRef.current = () => setVisibleRef.current(false);
|
|
3193
3468
|
const exclusiveTooltip = role === "tooltip" && triggers.includes("hover");
|
|
3194
3469
|
function openNow() {
|
|
@@ -3216,7 +3491,7 @@ function Floating({
|
|
|
3216
3491
|
if (delay <= 0) closeNow();
|
|
3217
3492
|
else leaveTimer.current = window.setTimeout(closeNow, delay * 1e3);
|
|
3218
3493
|
}
|
|
3219
|
-
(0,
|
|
3494
|
+
(0, import_react15.useEffect)(() => {
|
|
3220
3495
|
if (!visible || !triggers.includes("click")) return;
|
|
3221
3496
|
const close = (event) => {
|
|
3222
3497
|
const target = event.target;
|
|
@@ -3225,7 +3500,7 @@ function Floating({
|
|
|
3225
3500
|
document.addEventListener("pointerdown", close);
|
|
3226
3501
|
return () => document.removeEventListener("pointerdown", close);
|
|
3227
3502
|
}, [triggers.join("|"), visible]);
|
|
3228
|
-
(0,
|
|
3503
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
3229
3504
|
if (!visible) {
|
|
3230
3505
|
setPosition(void 0);
|
|
3231
3506
|
return;
|
|
@@ -3263,11 +3538,11 @@ function Floating({
|
|
|
3263
3538
|
observer.disconnect();
|
|
3264
3539
|
};
|
|
3265
3540
|
}, [children, content, placement, visible, portalContainer, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
|
|
3266
|
-
(0,
|
|
3541
|
+
(0, import_react15.useEffect)(() => () => {
|
|
3267
3542
|
clearTimers();
|
|
3268
3543
|
if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
|
|
3269
3544
|
}, []);
|
|
3270
|
-
const child = (0,
|
|
3545
|
+
const child = (0, import_react15.cloneElement)(children, {
|
|
3271
3546
|
...triggers.includes("hover") ? { onMouseEnter: (event) => {
|
|
3272
3547
|
triggerElementRef.current = event.currentTarget;
|
|
3273
3548
|
children.props.onMouseEnter?.(event);
|
|
@@ -3293,7 +3568,7 @@ function Floating({
|
|
|
3293
3568
|
"aria-describedby": visible ? contentId : void 0
|
|
3294
3569
|
});
|
|
3295
3570
|
const overlay = visible && content !== null && content !== void 0 && typeof document !== "undefined" ? (0, import_react_dom3.createPortal)(
|
|
3296
|
-
/* @__PURE__ */ (0,
|
|
3571
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
3297
3572
|
"span",
|
|
3298
3573
|
{
|
|
3299
3574
|
ref: overlayRef,
|
|
@@ -3313,23 +3588,23 @@ function Floating({
|
|
|
3313
3588
|
onMouseLeave: triggers.includes("hover") ? () => hide(mouseLeaveDelay) : void 0,
|
|
3314
3589
|
children: [
|
|
3315
3590
|
content,
|
|
3316
|
-
arrow ? /* @__PURE__ */ (0,
|
|
3591
|
+
arrow ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sia-floating__arrow" }) : null
|
|
3317
3592
|
]
|
|
3318
3593
|
}
|
|
3319
3594
|
),
|
|
3320
3595
|
portalContainer ?? document.body
|
|
3321
3596
|
) : null;
|
|
3322
|
-
return /* @__PURE__ */ (0,
|
|
3323
|
-
/* @__PURE__ */ (0,
|
|
3597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
3598
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { ref: rootRef, className: `sia-floating ${className}`.trim(), children: child }),
|
|
3324
3599
|
overlay
|
|
3325
3600
|
] });
|
|
3326
3601
|
}
|
|
3327
3602
|
function Tooltip(props) {
|
|
3328
|
-
return /* @__PURE__ */ (0,
|
|
3603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Floating, { ...props, content: props.title });
|
|
3329
3604
|
}
|
|
3330
3605
|
|
|
3331
3606
|
// src/components/SelectionPanel.tsx
|
|
3332
|
-
var
|
|
3607
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3333
3608
|
function SelectionPanel({
|
|
3334
3609
|
options,
|
|
3335
3610
|
value,
|
|
@@ -3350,26 +3625,26 @@ function SelectionPanel({
|
|
|
3350
3625
|
maxHeight = 250,
|
|
3351
3626
|
autoFocusSearch = false
|
|
3352
3627
|
}) {
|
|
3353
|
-
const [localSearch, setLocalSearch] = (0,
|
|
3628
|
+
const [localSearch, setLocalSearch] = (0, import_react16.useState)("");
|
|
3354
3629
|
const search = searchValue ?? localSearch;
|
|
3355
|
-
const [scrollTop, setScrollTop] = (0,
|
|
3356
|
-
const [active, setActive] = (0,
|
|
3357
|
-
const [keyboardActive, setKeyboardActive] = (0,
|
|
3358
|
-
const [deselectedHover, setDeselectedHover] = (0,
|
|
3359
|
-
const listRef = (0,
|
|
3360
|
-
const id = (0,
|
|
3361
|
-
const selected = (0,
|
|
3630
|
+
const [scrollTop, setScrollTop] = (0, import_react16.useState)(0);
|
|
3631
|
+
const [active, setActive] = (0, import_react16.useState)();
|
|
3632
|
+
const [keyboardActive, setKeyboardActive] = (0, import_react16.useState)(false);
|
|
3633
|
+
const [deselectedHover, setDeselectedHover] = (0, import_react16.useState)();
|
|
3634
|
+
const listRef = (0, import_react16.useRef)(null);
|
|
3635
|
+
const id = (0, import_react16.useId)();
|
|
3636
|
+
const selected = (0, import_react16.useMemo)(() => new Set(value), [value]);
|
|
3362
3637
|
const count = Math.max(1, Math.floor(columns));
|
|
3363
|
-
const allOptions = (0,
|
|
3638
|
+
const allOptions = (0, import_react16.useMemo)(() => {
|
|
3364
3639
|
if (!includeUnknownValues) return [...options];
|
|
3365
3640
|
const known = new Set(options.filter((option) => option.optionType !== "divider").map((option) => option.value));
|
|
3366
3641
|
return [...value.filter((item) => !known.has(item)).map((item) => ({ value: item, label: String(item), group: "\u81EA\u5B9A\u4E49\u503C" })), ...options];
|
|
3367
3642
|
}, [options, value, includeUnknownValues]);
|
|
3368
|
-
const filtered = (0,
|
|
3643
|
+
const filtered = (0, import_react16.useMemo)(
|
|
3369
3644
|
() => allOptions.filter((option) => (!selectedOnly || selected.has(option.value)) && (!search || option.optionType !== "divider" && [option.label, option.value].some((text) => String(text ?? "").toLowerCase().includes(search.toLowerCase())))),
|
|
3370
3645
|
[allOptions, selectedOnly, selected, search]
|
|
3371
3646
|
);
|
|
3372
|
-
const rows = (0,
|
|
3647
|
+
const rows = (0, import_react16.useMemo)(() => {
|
|
3373
3648
|
const groups = /* @__PURE__ */ new Map();
|
|
3374
3649
|
filtered.forEach((option) => {
|
|
3375
3650
|
const items = groups.get(option.group) ?? [];
|
|
@@ -3395,7 +3670,7 @@ function SelectionPanel({
|
|
|
3395
3670
|
const virtual = filtered.length > 100;
|
|
3396
3671
|
const renderedRows = virtual ? rows.filter((row) => row.top + row.height >= scrollTop - 100 && row.top <= scrollTop + maxHeight + 100) : rows;
|
|
3397
3672
|
const enabled = filtered.filter((option) => !option.disabled && option.optionType !== "divider");
|
|
3398
|
-
(0,
|
|
3673
|
+
(0, import_react16.useEffect)(() => {
|
|
3399
3674
|
setScrollTop(0);
|
|
3400
3675
|
if (listRef.current) listRef.current.scrollTop = 0;
|
|
3401
3676
|
setActive(void 0);
|
|
@@ -3418,9 +3693,9 @@ function SelectionPanel({
|
|
|
3418
3693
|
const add = enabled.filter((option) => operation === "all" || !selected.has(option.value)).map((option) => option.value);
|
|
3419
3694
|
onChange([...retained, ...add]);
|
|
3420
3695
|
}
|
|
3421
|
-
return /* @__PURE__ */ (0,
|
|
3422
|
-
/* @__PURE__ */ (0,
|
|
3423
|
-
showSearch && /* @__PURE__ */ (0,
|
|
3696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sia-selection-panel", children: [
|
|
3697
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FloatingScrollbarProvider, { targetRef: listRef }),
|
|
3698
|
+
showSearch && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3424
3699
|
Input,
|
|
3425
3700
|
{
|
|
3426
3701
|
"aria-label": "\u641C\u7D22\u9009\u9879",
|
|
@@ -3434,17 +3709,17 @@ function SelectionPanel({
|
|
|
3434
3709
|
}
|
|
3435
3710
|
}
|
|
3436
3711
|
),
|
|
3437
|
-
multiple && showActions && /* @__PURE__ */ (0,
|
|
3438
|
-
/* @__PURE__ */ (0,
|
|
3439
|
-
/* @__PURE__ */ (0,
|
|
3440
|
-
/* @__PURE__ */ (0,
|
|
3441
|
-
/* @__PURE__ */ (0,
|
|
3712
|
+
multiple && showActions && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sia-selection-panel__actions", children: [
|
|
3713
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { variant: "link", size: "small", disabled: disabled || loading || !enabled.length, onClick: () => batch("all"), children: "\u5168\u9009" }),
|
|
3714
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { variant: "link", size: "small", disabled: disabled || loading || !enabled.length, onClick: () => batch("invert"), children: "\u53CD\u9009" }),
|
|
3715
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { variant: "link", size: "small", disabled: disabled || loading || !value.length, onClick: () => batch("clear"), children: "\u6E05\u7A7A" }),
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
3442
3717
|
"\u5DF2\u9009 ",
|
|
3443
3718
|
value.length,
|
|
3444
3719
|
" \u9879"
|
|
3445
3720
|
] })
|
|
3446
3721
|
] }),
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3722
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3448
3723
|
"div",
|
|
3449
3724
|
{
|
|
3450
3725
|
ref: listRef,
|
|
@@ -3481,12 +3756,12 @@ function SelectionPanel({
|
|
|
3481
3756
|
toggle(enabled[index], true);
|
|
3482
3757
|
}
|
|
3483
3758
|
},
|
|
3484
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
3759
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { role: "status", children: "\u52A0\u8F7D\u4E2D\u2026" }) : !rows.length ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sia-selection-panel__empty", children: "\u6682\u65E0\u5339\u914D\u9009\u9879" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { height: totalHeight, position: "relative" }, children: renderedRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3485
3760
|
"div",
|
|
3486
3761
|
{
|
|
3487
3762
|
className: row.title !== void 0 ? "sia-selection-panel__group" : "sia-selection-panel__row",
|
|
3488
3763
|
style: { position: "absolute", top: row.top, height: row.height, width: "100%", gridTemplateColumns: `repeat(${count}, minmax(0, 1fr))` },
|
|
3489
|
-
children: row.title ?? row.items?.map((option, index) => option.optionType === "divider" ? /* @__PURE__ */ (0,
|
|
3764
|
+
children: row.title ?? row.items?.map((option, index) => option.optionType === "divider" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { role: "separator", className: "sia-selection-panel__divider" }, `divider-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Tooltip, { title: option.disabled ? option.disabledTip : void 0, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3490
3765
|
"div",
|
|
3491
3766
|
{
|
|
3492
3767
|
role: "option",
|
|
@@ -3502,12 +3777,12 @@ function SelectionPanel({
|
|
|
3502
3777
|
onClick: (event) => {
|
|
3503
3778
|
if (!event.target.closest(".sia-checkbox")) toggle(option);
|
|
3504
3779
|
},
|
|
3505
|
-
children: multiple ? /* @__PURE__ */ (0,
|
|
3506
|
-
/* @__PURE__ */ (0,
|
|
3507
|
-
showValue && /* @__PURE__ */ (0,
|
|
3508
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
showValue && /* @__PURE__ */ (0,
|
|
3780
|
+
children: multiple ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Checkbox2, { checked: selected.has(option.value), disabled: disabled || loading || option.disabled, tabIndex: -1, onChange: () => toggle(option), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "sia-selection-panel__text", children: [
|
|
3781
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sia-selection-panel__label", children: showValue || displayField === "label" ? option.label : String(option.value) }),
|
|
3782
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: String(option.value) })
|
|
3783
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "sia-selection-panel__text", children: [
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sia-selection-panel__label", children: showValue || displayField === "label" ? option.label : String(option.value) }),
|
|
3785
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: String(option.value) })
|
|
3511
3786
|
] })
|
|
3512
3787
|
}
|
|
3513
3788
|
) }, `${typeof option.value}-${option.value}`))
|
|
@@ -3520,14 +3795,14 @@ function SelectionPanel({
|
|
|
3520
3795
|
}
|
|
3521
3796
|
|
|
3522
3797
|
// src/components/OverflowTags.tsx
|
|
3523
|
-
var
|
|
3524
|
-
var
|
|
3798
|
+
var import_react17 = require("react");
|
|
3799
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3525
3800
|
function OverflowTags({ items, maxCount, className = "", tagClassName, restClassName = "" }) {
|
|
3526
|
-
const rootRef = (0,
|
|
3527
|
-
const measureRef = (0,
|
|
3801
|
+
const rootRef = (0, import_react17.useRef)(null);
|
|
3802
|
+
const measureRef = (0, import_react17.useRef)(null);
|
|
3528
3803
|
const limit = Math.min(items.length, Math.max(0, Math.floor(maxCount) || 0));
|
|
3529
|
-
const [visibleCount, setVisibleCount] = (0,
|
|
3530
|
-
(0,
|
|
3804
|
+
const [visibleCount, setVisibleCount] = (0, import_react17.useState)(0);
|
|
3805
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
3531
3806
|
const root = rootRef.current;
|
|
3532
3807
|
const measure = measureRef.current;
|
|
3533
3808
|
if (!root || !measure) return;
|
|
@@ -3550,15 +3825,15 @@ function OverflowTags({ items, maxCount, className = "", tagClassName, restClass
|
|
|
3550
3825
|
return () => observer.disconnect();
|
|
3551
3826
|
}, [items, limit]);
|
|
3552
3827
|
const count = Math.min(visibleCount, limit);
|
|
3553
|
-
return /* @__PURE__ */ (0,
|
|
3554
|
-
items.slice(0, count).map((item) => /* @__PURE__ */ (0,
|
|
3555
|
-
items.length > count ? /* @__PURE__ */ (0,
|
|
3828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { ref: rootRef, className: `sia-overflow-tags ${className}`.trim(), children: [
|
|
3829
|
+
items.slice(0, count).map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: tagClassName, children: item.label }, item.key)),
|
|
3830
|
+
items.length > count ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: `${tagClassName} sia-overflow-tags__rest ${restClassName}`.trim(), children: [
|
|
3556
3831
|
"+",
|
|
3557
3832
|
items.length - count
|
|
3558
3833
|
] }) : null,
|
|
3559
|
-
/* @__PURE__ */ (0,
|
|
3560
|
-
items.slice(0, limit).map((item) => /* @__PURE__ */ (0,
|
|
3561
|
-
Array.from({ length: limit + 1 }, (_, index) => /* @__PURE__ */ (0,
|
|
3834
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { ref: measureRef, className: "sia-overflow-tags__measure", "aria-hidden": "true", children: [
|
|
3835
|
+
items.slice(0, limit).map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: tagClassName, children: item.label }, item.key)),
|
|
3836
|
+
Array.from({ length: limit + 1 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: `${tagClassName} ${restClassName}`.trim(), children: [
|
|
3562
3837
|
"+",
|
|
3563
3838
|
items.length - index
|
|
3564
3839
|
] }, `rest-${index}`))
|
|
@@ -3567,12 +3842,12 @@ function OverflowTags({ items, maxCount, className = "", tagClassName, restClass
|
|
|
3567
3842
|
}
|
|
3568
3843
|
|
|
3569
3844
|
// src/components/Select.tsx
|
|
3570
|
-
var
|
|
3845
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3571
3846
|
function defaultFilterOption(query, option) {
|
|
3572
3847
|
const keyword = query.toLowerCase();
|
|
3573
3848
|
return [option.label, option.value].some((value) => String(value).toLowerCase().includes(keyword));
|
|
3574
3849
|
}
|
|
3575
|
-
var Select = (0,
|
|
3850
|
+
var Select = (0, import_react18.forwardRef)(function Select2({
|
|
3576
3851
|
options,
|
|
3577
3852
|
mode = "single",
|
|
3578
3853
|
popupMode: popupModeProp,
|
|
@@ -3611,27 +3886,27 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3611
3886
|
}, forwardedRef) {
|
|
3612
3887
|
const showSearch = showSearchProp ?? options.length > 15;
|
|
3613
3888
|
const size = useControlSize(sizeProp);
|
|
3614
|
-
const fallbackId = (0,
|
|
3889
|
+
const fallbackId = (0, import_react18.useId)();
|
|
3615
3890
|
const selectId = id ?? fallbackId;
|
|
3616
3891
|
const listboxId = `${selectId}-listbox`;
|
|
3617
|
-
const rootRef = (0,
|
|
3618
|
-
const popupRef = (0,
|
|
3619
|
-
const searchRef = (0,
|
|
3620
|
-
const listRef = (0,
|
|
3621
|
-
const [open, setOpen] = (0,
|
|
3892
|
+
const rootRef = (0, import_react18.useRef)(null);
|
|
3893
|
+
const popupRef = (0, import_react18.useRef)(null);
|
|
3894
|
+
const searchRef = (0, import_react18.useRef)(null);
|
|
3895
|
+
const listRef = (0, import_react18.useRef)(null);
|
|
3896
|
+
const [open, setOpen] = (0, import_react18.useState)(false);
|
|
3622
3897
|
const automaticMode = popupModeProp ?? (options.length > modalThreshold ? "modal" : "dropdown");
|
|
3623
|
-
const [openedMode, setOpenedMode] = (0,
|
|
3898
|
+
const [openedMode, setOpenedMode] = (0, import_react18.useState)(automaticMode);
|
|
3624
3899
|
const popupMode = open ? openedMode : automaticMode;
|
|
3625
|
-
const [modalValues, setModalValues] = (0,
|
|
3626
|
-
const [modalSubmitting, setModalSubmitting] = (0,
|
|
3627
|
-
const modalSubmitLock = (0,
|
|
3628
|
-
const [selectedOnly, setSelectedOnly] = (0,
|
|
3629
|
-
const [query, setQuery] = (0,
|
|
3630
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
3631
|
-
const [scrollTop, setScrollTop] = (0,
|
|
3632
|
-
const [dropdownFontSize, setDropdownFontSize] = (0,
|
|
3633
|
-
const pendingSelectedScroll = (0,
|
|
3634
|
-
const deferredQuery = (0,
|
|
3900
|
+
const [modalValues, setModalValues] = (0, import_react18.useState)([]);
|
|
3901
|
+
const [modalSubmitting, setModalSubmitting] = (0, import_react18.useState)(false);
|
|
3902
|
+
const modalSubmitLock = (0, import_react18.useRef)(false);
|
|
3903
|
+
const [selectedOnly, setSelectedOnly] = (0, import_react18.useState)(false);
|
|
3904
|
+
const [query, setQuery] = (0, import_react18.useState)("");
|
|
3905
|
+
const [activeIndex, setActiveIndex] = (0, import_react18.useState)(-1);
|
|
3906
|
+
const [scrollTop, setScrollTop] = (0, import_react18.useState)(0);
|
|
3907
|
+
const [dropdownFontSize, setDropdownFontSize] = (0, import_react18.useState)();
|
|
3908
|
+
const pendingSelectedScroll = (0, import_react18.useRef)(false);
|
|
3909
|
+
const deferredQuery = (0, import_react18.useDeferredValue)(query.trim());
|
|
3635
3910
|
const initialValue = defaultValue === void 0 ? mode === "multiple" ? [] : null : defaultValue;
|
|
3636
3911
|
const [currentValue, setCurrentValue] = useControllableState({
|
|
3637
3912
|
value,
|
|
@@ -3646,20 +3921,20 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3646
3921
|
}
|
|
3647
3922
|
}
|
|
3648
3923
|
});
|
|
3649
|
-
const selectedValues = (0,
|
|
3924
|
+
const selectedValues = (0, import_react18.useMemo)(() => {
|
|
3650
3925
|
if (currentValue == null || currentValue === "" && !options.some((option) => option.value === "")) return [];
|
|
3651
3926
|
if (mode === "multiple") return Array.isArray(currentValue) ? currentValue : currentValue === null ? [] : [currentValue];
|
|
3652
3927
|
return Array.isArray(currentValue) ? currentValue.slice(0, 1) : currentValue === null ? [] : [currentValue];
|
|
3653
3928
|
}, [currentValue, mode, options]);
|
|
3654
|
-
const selectedValueSet = (0,
|
|
3655
|
-
const availableOptions = (0,
|
|
3929
|
+
const selectedValueSet = (0, import_react18.useMemo)(() => new Set(selectedValues), [selectedValues]);
|
|
3930
|
+
const availableOptions = (0, import_react18.useMemo)(() => {
|
|
3656
3931
|
if (!allowInput) return options;
|
|
3657
3932
|
const optionValueSet = new Set(options.map((option) => option.value));
|
|
3658
3933
|
const selectedCustomOptions = selectedValues.filter((selectedValue) => !optionValueSet.has(selectedValue)).map((selectedValue) => ({ label: String(selectedValue), value: selectedValue }));
|
|
3659
3934
|
return selectedCustomOptions.length ? [...selectedCustomOptions, ...options] : options;
|
|
3660
3935
|
}, [allowInput, options, selectedValues]);
|
|
3661
|
-
const selectedOptions = (0,
|
|
3662
|
-
const filteredOptions = (0,
|
|
3936
|
+
const selectedOptions = (0, import_react18.useMemo)(() => selectedValues.map((selectedValue) => availableOptions.find((option) => option.value === selectedValue)).filter((option) => option !== void 0), [availableOptions, selectedValues]);
|
|
3937
|
+
const filteredOptions = (0, import_react18.useMemo)(() => deferredQuery ? availableOptions.filter((option) => filterOption(deferredQuery, option)) : availableOptions, [availableOptions, deferredQuery, filterOption]);
|
|
3663
3938
|
const inputValue = query.trim();
|
|
3664
3939
|
const exactInputOption = inputValue ? availableOptions.find((option) => String(option.value).toLowerCase() === inputValue.toLowerCase() || typeof option.label === "string" && option.label.toLowerCase() === inputValue.toLowerCase()) : void 0;
|
|
3665
3940
|
const canSubmitInput = allowInput && Boolean(inputValue) && !exactInputOption;
|
|
@@ -3673,7 +3948,7 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3673
3948
|
const renderedOptions = virtualEnabled ? filteredOptions.slice(virtualStart, virtualEnd) : filteredOptions;
|
|
3674
3949
|
const enabledFilteredOptions = filteredOptions.filter((option) => !option.disabled);
|
|
3675
3950
|
const allFilteredSelected = enabledFilteredOptions.length > 0 && enabledFilteredOptions.every((option) => selectedValueSet.has(option.value));
|
|
3676
|
-
(0,
|
|
3951
|
+
(0, import_react18.useEffect)(() => {
|
|
3677
3952
|
if (!open || popupMode === "modal") return void 0;
|
|
3678
3953
|
function closeFromOutside(event) {
|
|
3679
3954
|
const target = event.target;
|
|
@@ -3682,13 +3957,13 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3682
3957
|
document.addEventListener("mousedown", closeFromOutside);
|
|
3683
3958
|
return () => document.removeEventListener("mousedown", closeFromOutside);
|
|
3684
3959
|
}, [open, popupMode]);
|
|
3685
|
-
(0,
|
|
3960
|
+
(0, import_react18.useEffect)(() => {
|
|
3686
3961
|
if (open && (showSearch || allowInput)) searchRef.current?.focus();
|
|
3687
3962
|
}, [allowInput, open, showSearch]);
|
|
3688
|
-
(0,
|
|
3963
|
+
(0, import_react18.useEffect)(() => {
|
|
3689
3964
|
if (disabled || loading) closeDropdown();
|
|
3690
3965
|
}, [disabled, loading]);
|
|
3691
|
-
(0,
|
|
3966
|
+
(0, import_react18.useEffect)(() => {
|
|
3692
3967
|
if (!open || popupMode !== "dropdown" || !pendingSelectedScroll.current || query) return;
|
|
3693
3968
|
const index = filteredOptions.findIndex((option) => selectedValueSet.has(option.value));
|
|
3694
3969
|
if (index < 0) return;
|
|
@@ -3703,7 +3978,7 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3703
3978
|
});
|
|
3704
3979
|
return () => cancelAnimationFrame(frame);
|
|
3705
3980
|
}, [open, popupMode, filteredOptions, selectedValueSet, virtualEnabled, optionHeight, query]);
|
|
3706
|
-
(0,
|
|
3981
|
+
(0, import_react18.useLayoutEffect)(() => {
|
|
3707
3982
|
if (!open || popupMode !== "dropdown") return;
|
|
3708
3983
|
const trigger = rootRef.current?.querySelector(".sia-select__trigger");
|
|
3709
3984
|
if (trigger) setDropdownFontSize(getComputedStyle(trigger).fontSize);
|
|
@@ -3854,7 +4129,7 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3854
4129
|
function renderOption(option, renderedIndex) {
|
|
3855
4130
|
const optionIndex = virtualEnabled ? virtualStart + renderedIndex : renderedIndex;
|
|
3856
4131
|
const selected = selectedValueSet.has(option.value);
|
|
3857
|
-
return /* @__PURE__ */ (0,
|
|
4132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3858
4133
|
"div",
|
|
3859
4134
|
{
|
|
3860
4135
|
id: `${listboxId}-${optionIndex}`,
|
|
@@ -3867,11 +4142,11 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3867
4142
|
onMouseDown: (event) => event.preventDefault(),
|
|
3868
4143
|
onClick: () => selectOption(option),
|
|
3869
4144
|
children: [
|
|
3870
|
-
/* @__PURE__ */ (0,
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
3872
|
-
showValue ? /* @__PURE__ */ (0,
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "sia-select__option-content", children: [
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sia-select__option-label", children: option.label }),
|
|
4147
|
+
showValue ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { className: "sia-select__option-value", children: String(option.value) }) : null
|
|
3873
4148
|
] }),
|
|
3874
|
-
selected ? /* @__PURE__ */ (0,
|
|
4149
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "check", size: 15 }) : null
|
|
3875
4150
|
]
|
|
3876
4151
|
},
|
|
3877
4152
|
`${typeof option.value}-${option.value}`
|
|
@@ -3885,8 +4160,8 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3885
4160
|
setModalValues([...modalValues.filter((value2) => !editable.has(value2)), ...modalEnabled.filter((option) => operation === "all" || operation === "invert" && !modalValues.includes(option.value)).map((option) => option.value)]);
|
|
3886
4161
|
}
|
|
3887
4162
|
const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: hasValue, active: open });
|
|
3888
|
-
return /* @__PURE__ */ (0,
|
|
3889
|
-
/* @__PURE__ */ (0,
|
|
4163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: rootRef, className: `sia-select sia-select--${size} sia-select--${status}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""}${multiple ? " sia-select--multiple" : ""} ${className}`.trim(), style, children: [
|
|
4164
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3890
4165
|
"button",
|
|
3891
4166
|
{
|
|
3892
4167
|
...withTitleTooltip(props),
|
|
@@ -3904,29 +4179,29 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3904
4179
|
onClick: () => open ? closeDropdown() : openDropdown(),
|
|
3905
4180
|
onKeyDown: handleTriggerKeyDown,
|
|
3906
4181
|
children: [
|
|
3907
|
-
multiple && hasValue ? /* @__PURE__ */ (0,
|
|
3908
|
-
loading ? /* @__PURE__ */ (0,
|
|
4182
|
+
multiple && hasValue ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(OverflowTags, { className: "sia-select__tags", tagClassName: "sia-select__tag", restClassName: "sia-select__tag--rest", maxCount: maxTagCount, items: selectedOptions.map((option) => ({ key: `${typeof option.value}-${option.value}`, label: option.label })) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `sia-select__value${hasValue ? "" : " is-placeholder"}`, children: selectedOptions[0]?.label ?? placeholder }),
|
|
4183
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sia-select__spinner", "aria-hidden": "true" }) : null,
|
|
3909
4184
|
floating.label,
|
|
3910
|
-
/* @__PURE__ */ (0,
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { className: "sia-select__arrow", name: "chevron-down", size: 15 })
|
|
3911
4186
|
]
|
|
3912
4187
|
}
|
|
3913
4188
|
),
|
|
3914
|
-
allowClear && hasValue && !disabled && !loading ? /* @__PURE__ */ (0,
|
|
3915
|
-
/* @__PURE__ */ (0,
|
|
3916
|
-
/* @__PURE__ */ (0,
|
|
3917
|
-
showSearch || allowInput ? /* @__PURE__ */ (0,
|
|
3918
|
-
/* @__PURE__ */ (0,
|
|
3919
|
-
/* @__PURE__ */ (0,
|
|
4189
|
+
allowClear && hasValue && !disabled && !loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "sia-select__clear", type: "button", "aria-label": "\u6E05\u7A7A\u9009\u62E9", onClick: clearValue, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
|
|
4190
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: open && popupMode === "dropdown", style: { fontSize: dropdownFontSize }, className: `sia-select__dropdown${filteredOptions.length === 0 && !canSubmitInput ? " sia-select__dropdown--empty" : ""}`, children: [
|
|
4191
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FloatingScrollbarProvider, { targetRef: listRef }),
|
|
4192
|
+
showSearch || allowInput ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "sia-select__search", children: [
|
|
4193
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "search", size: 15 }),
|
|
4194
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { ref: searchRef, value: query, maxLength: inputMaxLength, onChange: handleSearchChange, onKeyDown: (event) => handleInteractionKeyDown(event, true), placeholder: searchPlaceholder, "aria-label": searchPlaceholder })
|
|
3920
4195
|
] }) : null,
|
|
3921
|
-
canSubmitInput ? /* @__PURE__ */ (0,
|
|
3922
|
-
/* @__PURE__ */ (0,
|
|
3923
|
-
/* @__PURE__ */ (0,
|
|
4196
|
+
canSubmitInput ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "sia-select__input-option", onMouseDown: (event) => event.preventDefault(), onClick: submitInputValue, children: [
|
|
4197
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "plus", size: 14 }),
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
|
|
3924
4199
|
"\u4F7F\u7528\u201C",
|
|
3925
4200
|
inputValue,
|
|
3926
4201
|
"\u201D"
|
|
3927
4202
|
] })
|
|
3928
4203
|
] }) : null,
|
|
3929
|
-
/* @__PURE__ */ (0,
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3930
4205
|
"div",
|
|
3931
4206
|
{
|
|
3932
4207
|
ref: listRef,
|
|
@@ -3937,23 +4212,23 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3937
4212
|
"aria-multiselectable": multiple || void 0,
|
|
3938
4213
|
style: { maxHeight: listHeight },
|
|
3939
4214
|
onScroll: handleListScroll,
|
|
3940
|
-
children: filteredOptions.length > 0 ? virtualEnabled ? /* @__PURE__ */ (0,
|
|
4215
|
+
children: filteredOptions.length > 0 ? virtualEnabled ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "sia-select__virtual-space", style: { height: filteredOptions.length * optionHeight }, children: renderedOptions.map(renderOption) }) : renderedOptions.map(renderOption) : canSubmitInput ? null : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "sia-select__empty", children: notFoundContent })
|
|
3941
4216
|
}
|
|
3942
4217
|
),
|
|
3943
|
-
showActions ? /* @__PURE__ */ (0,
|
|
3944
|
-
/* @__PURE__ */ (0,
|
|
4218
|
+
showActions ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "sia-select__actions", children: [
|
|
4219
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
|
|
3945
4220
|
"\u5171 ",
|
|
3946
4221
|
filteredOptions.length,
|
|
3947
4222
|
" \u6761"
|
|
3948
4223
|
] }),
|
|
3949
|
-
multiple && showSelectAll ? /* @__PURE__ */ (0,
|
|
3950
|
-
/* @__PURE__ */ (0,
|
|
3951
|
-
/* @__PURE__ */ (0,
|
|
4224
|
+
multiple && showSelectAll ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
4225
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "link", size: "small", disabled: allFilteredSelected || !enabledFilteredOptions.length, onClick: selectAllFiltered, children: "\u5168\u9009" }),
|
|
4226
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "link", size: "small", disabled: !enabledFilteredOptions.length, onClick: invertFiltered, children: "\u53CD\u9009" })
|
|
3952
4227
|
] }) : null,
|
|
3953
|
-
multiple || allowClear ? /* @__PURE__ */ (0,
|
|
4228
|
+
multiple || allowClear ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "link", size: "small", danger: true, disabled: !hasValue, onClick: clearSelection, children: "\u6E05\u7A7A" }) : null
|
|
3954
4229
|
] }) : null
|
|
3955
4230
|
] }),
|
|
3956
|
-
popupMode === "modal" ? /* @__PURE__ */ (0,
|
|
4231
|
+
popupMode === "modal" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3957
4232
|
Modal2,
|
|
3958
4233
|
{
|
|
3959
4234
|
className: "sia-select-modal",
|
|
@@ -3965,30 +4240,30 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3965
4240
|
if (!next) closeDropdown();
|
|
3966
4241
|
},
|
|
3967
4242
|
onCancel: closeDropdown,
|
|
3968
|
-
footer: /* @__PURE__ */ (0,
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
3970
|
-
/* @__PURE__ */ (0,
|
|
3971
|
-
/* @__PURE__ */ (0,
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
4243
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "sia-select-modal__footer", children: [
|
|
4244
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: modalConfig?.footerExtra }),
|
|
4245
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
4246
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { disabled: modalSubmitting, onClick: closeDropdown, children: "\u53D6\u6D88" }),
|
|
4247
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "primary", loading: modalSubmitting, disabled: disabled || loading, onClick: confirmModalSelection, children: "\u786E\u5B9A" })
|
|
3973
4248
|
] })
|
|
3974
4249
|
] }),
|
|
3975
|
-
children: open ? /* @__PURE__ */ (0,
|
|
3976
|
-
modalConfig?.headerExtra != null && modalConfig.headerExtra !== false ? /* @__PURE__ */ (0,
|
|
3977
|
-
/* @__PURE__ */ (0,
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
3979
|
-
/* @__PURE__ */ (0,
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
4250
|
+
children: open ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
4251
|
+
modalConfig?.headerExtra != null && modalConfig.headerExtra !== false ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "sia-select-modal__header-extra", children: modalConfig.headerExtra }) : null,
|
|
4252
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "sia-select-modal__heading", children: [
|
|
4253
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
|
|
4254
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { role: "tab", "aria-selected": !selectedOnly, variant: "link", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
|
|
4255
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Button, { role: "tab", "aria-selected": selectedOnly, variant: "link", onClick: () => setSelectedOnly(true), children: [
|
|
3981
4256
|
"\u5DF2\u9009\u9879(",
|
|
3982
4257
|
modalValues.length,
|
|
3983
4258
|
")"
|
|
3984
4259
|
] })
|
|
3985
4260
|
] }),
|
|
3986
|
-
/* @__PURE__ */ (0,
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3987
4262
|
Input,
|
|
3988
4263
|
{
|
|
3989
4264
|
"aria-label": searchPlaceholder,
|
|
3990
4265
|
placeholder: searchPlaceholder,
|
|
3991
|
-
prefix: /* @__PURE__ */ (0,
|
|
4266
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "search", size: 14 }),
|
|
3992
4267
|
value: query,
|
|
3993
4268
|
allowClear: true,
|
|
3994
4269
|
onChange: (event) => {
|
|
@@ -3998,8 +4273,8 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
3998
4273
|
}
|
|
3999
4274
|
)
|
|
4000
4275
|
] }),
|
|
4001
|
-
multiple && showSelectAll ? /* @__PURE__ */ (0,
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4276
|
+
multiple && showSelectAll ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "sia-select-modal__actions", children: [
|
|
4277
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4003
4278
|
Checkbox2,
|
|
4004
4279
|
{
|
|
4005
4280
|
checked: modalEnabled.length > 0 && modalEnabled.every((option) => modalValues.includes(option.value)),
|
|
@@ -4009,10 +4284,10 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
4009
4284
|
children: "\u5168\u9009"
|
|
4010
4285
|
}
|
|
4011
4286
|
),
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
4013
|
-
/* @__PURE__ */ (0,
|
|
4287
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "link", size: "small", disabled: !modalEnabled.length, onClick: () => modalBatch("invert"), children: "\u53CD\u9009" }),
|
|
4288
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "link", size: "small", danger: true, disabled: !modalValues.length, onClick: () => setModalValues([]), children: "\u6E05\u7A7A" })
|
|
4014
4289
|
] }) : null,
|
|
4015
|
-
allowInput && canSubmitInput ? /* @__PURE__ */ (0,
|
|
4290
|
+
allowInput && canSubmitInput ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Button, { variant: "link", onClick: () => {
|
|
4016
4291
|
setModalValues(multiple ? [.../* @__PURE__ */ new Set([...modalValues, inputValue])] : [inputValue]);
|
|
4017
4292
|
setQuery("");
|
|
4018
4293
|
}, children: [
|
|
@@ -4020,7 +4295,7 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
4020
4295
|
inputValue,
|
|
4021
4296
|
"\u201D"
|
|
4022
4297
|
] }) : null,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4298
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4024
4299
|
SelectionPanel,
|
|
4025
4300
|
{
|
|
4026
4301
|
options: modalFiltered,
|
|
@@ -4044,7 +4319,7 @@ var Select = (0, import_react17.forwardRef)(function Select2({
|
|
|
4044
4319
|
});
|
|
4045
4320
|
|
|
4046
4321
|
// src/components/SelectDateRange.tsx
|
|
4047
|
-
var
|
|
4322
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4048
4323
|
function SelectDateRange({
|
|
4049
4324
|
options,
|
|
4050
4325
|
value,
|
|
@@ -4067,8 +4342,8 @@ function SelectDateRange({
|
|
|
4067
4342
|
const size = useControlSize(sizeProp);
|
|
4068
4343
|
const initialValue = defaultValue ?? { select: options[0]?.value ?? "", range: ["", ""] };
|
|
4069
4344
|
const [currentValue, setCurrentValue] = useControllableState({ value: value === void 0 ? void 0 : value && typeof value === "object" ? value : { select: "", range: ["", ""] }, defaultValue: initialValue, onChange });
|
|
4070
|
-
return /* @__PURE__ */ (0,
|
|
4071
|
-
/* @__PURE__ */ (0,
|
|
4345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `sia-select-date-range sia-select-date-range--${size} ${className}`.trim(), role: "group", "aria-label": `${selectAriaLabel}\u4E0E${rangeAriaLabel}`, ...withTitleTooltip(props), style: { ...style, "--sia-select-date-range-select-width": typeof selectWidth === "number" ? `${selectWidth}px` : selectWidth }, children: [
|
|
4346
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4072
4347
|
Select,
|
|
4073
4348
|
{
|
|
4074
4349
|
className: "sia-select-date-range__select",
|
|
@@ -4086,7 +4361,7 @@ function SelectDateRange({
|
|
|
4086
4361
|
}
|
|
4087
4362
|
}
|
|
4088
4363
|
),
|
|
4089
|
-
/* @__PURE__ */ (0,
|
|
4364
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4090
4365
|
DatePicker.RangePicker,
|
|
4091
4366
|
{
|
|
4092
4367
|
className: "sia-select-date-range__picker",
|