barua-ui 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -956,8 +956,10 @@ function Breadcrumbs({
956
956
  import { forwardRef as forwardRef4 } from "react";
957
957
  import { Fragment, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
958
958
  var iconNames = [
959
+ "archive",
960
+ "arrow-left",
959
961
  "arrow-up-right",
960
- "backward",
962
+ "badge-check",
961
963
  "bell",
962
964
  "bolt",
963
965
  "bookmark",
@@ -970,9 +972,17 @@ var iconNames = [
970
972
  "chevron-up",
971
973
  "clock",
972
974
  "close",
975
+ "code",
976
+ "copy",
977
+ "display",
973
978
  "doc",
974
979
  "download",
975
980
  "drop",
981
+ "ellipsis",
982
+ "ellipsis-vertical",
983
+ "envelope-open",
984
+ "eye",
985
+ "eye-off",
976
986
  "film",
977
987
  "filter",
978
988
  "flame",
@@ -980,33 +990,45 @@ var iconNames = [
980
990
  "forward",
981
991
  "garage",
982
992
  "gear",
993
+ "gift",
994
+ "globe",
983
995
  "grid",
984
996
  "heart",
985
997
  "house",
998
+ "image-off",
986
999
  "info",
1000
+ "key",
987
1001
  "lightbulb",
988
1002
  "link",
989
1003
  "lock",
990
1004
  "mail",
1005
+ "menu",
991
1006
  "message",
992
1007
  "mic",
993
1008
  "moon-stars",
994
1009
  "music-note",
995
1010
  "newspaper",
1011
+ "paperclip",
996
1012
  "pause",
997
1013
  "pencil",
998
1014
  "people",
999
1015
  "person",
1016
+ "person-plus",
1000
1017
  "photo",
1001
1018
  "pin",
1002
1019
  "play",
1003
1020
  "plus",
1021
+ "power",
1004
1022
  "refresh",
1005
1023
  "repeat",
1024
+ "reply",
1025
+ "reply-all",
1006
1026
  "search",
1007
1027
  "send",
1008
1028
  "share",
1009
1029
  "shield",
1030
+ "skip-back",
1031
+ "skip-forward",
1010
1032
  "sliders",
1011
1033
  "sparkles",
1012
1034
  "speaker",
@@ -1014,15 +1036,22 @@ var iconNames = [
1014
1036
  "sun",
1015
1037
  "trash",
1016
1038
  "tv",
1039
+ "upload",
1017
1040
  "warning",
1018
1041
  "waveform",
1019
1042
  "wifi"
1020
1043
  ];
1021
1044
  var GLYPHS = {
1045
+ "archive": /* @__PURE__ */ jsxs6(Fragment, { children: [
1046
+ /* @__PURE__ */ jsx9("path", { d: "M3 4.5h14V7H3V4.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1047
+ /* @__PURE__ */ jsx9("path", { d: "M4.2 7v7.5a1 1 0 0 0 1 1h9.6a1 1 0 0 0 1-1V7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1048
+ /* @__PURE__ */ jsx9("path", { d: "M8 10h4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1049
+ ] }),
1050
+ "arrow-left": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M16.5 10h-13M8 4.5 3 10l5 5.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1022
1051
  "arrow-up-right": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M6 14 14 6M7.5 6H14v6.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1023
- "backward": /* @__PURE__ */ jsxs6(Fragment, { children: [
1024
- /* @__PURE__ */ jsx9("path", { d: "M5.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1025
- /* @__PURE__ */ jsx9("path", { d: "M15 5.6v8.8a.6.6 0 0 1-.93.5L7.6 10.5a.6.6 0 0 1 0-1l6.47-4.4a.6.6 0 0 1 .93.5Z", fill: "currentColor" })
1052
+ "badge-check": /* @__PURE__ */ jsxs6(Fragment, { children: [
1053
+ /* @__PURE__ */ jsx9("path", { d: "m10 2.6 2 1.5 2.5-.2.6 2.4 2 1.5-1 2.3 1 2.3-2 1.5-.6 2.4-2.5-.2-2 1.5-2-1.5-2.5.2-.6-2.4-2-1.5 1-2.3-1-2.3 2-1.5.6-2.4 2.5.2 2-1.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1054
+ /* @__PURE__ */ jsx9("path", { d: "m7.6 10.1 1.7 1.7 3.1-3.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1026
1055
  ] }),
1027
1056
  "bell": /* @__PURE__ */ jsxs6(Fragment, { children: [
1028
1057
  /* @__PURE__ */ jsx9("path", { d: "M10 3.5A4.5 4.5 0 0 1 14.5 8c0 3 1 4 1.5 4.5H4c.5-.5 1.5-1.5 1.5-4.5A4.5 4.5 0 0 1 10 3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
@@ -1048,12 +1077,40 @@ var GLYPHS = {
1048
1077
  /* @__PURE__ */ jsx9("path", { d: "M10 6.5V10l2.5 2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1049
1078
  ] }),
1050
1079
  "close": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m5 5 10 10M15 5 5 15", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1080
+ "code": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m7 7-3.5 3L7 13M13 7l3.5 3L13 13M11.4 5.2 8.6 14.8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1081
+ "copy": /* @__PURE__ */ jsxs6(Fragment, { children: [
1082
+ /* @__PURE__ */ jsx9("rect", { x: "7", y: "7", width: "9", height: "9", rx: "1.8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1083
+ /* @__PURE__ */ jsx9("path", { d: "M4.5 12.5h-.5A1.5 1.5 0 0 1 2.5 11V4A1.5 1.5 0 0 1 4 2.5h7A1.5 1.5 0 0 1 12.5 4v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1084
+ ] }),
1085
+ "display": /* @__PURE__ */ jsxs6(Fragment, { children: [
1086
+ /* @__PURE__ */ jsx9("rect", { x: "2.5", y: "4", width: "15", height: "9.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1087
+ /* @__PURE__ */ jsx9("path", { d: "M7 16.5h6M10 13.5v3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1088
+ ] }),
1051
1089
  "doc": /* @__PURE__ */ jsxs6(Fragment, { children: [
1052
1090
  /* @__PURE__ */ jsx9("path", { d: "M5.5 3.5h6L15 7v9.5H5.5V3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1053
1091
  /* @__PURE__ */ jsx9("path", { d: "M11.5 3.5V7H15M8 10.5h4M8 13h4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1054
1092
  ] }),
1055
1093
  "download": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 3.5v9M6.5 9.5l3.5 3 3.5-3M4 16.5h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1056
1094
  "drop": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 2.8C7.7 6 5.5 8.6 5.5 11.4a4.5 4.5 0 0 0 9 0c0-2.8-2.2-5.4-4.5-8.6Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1095
+ "ellipsis": /* @__PURE__ */ jsxs6(Fragment, { children: [
1096
+ /* @__PURE__ */ jsx9("circle", { cx: "4.6", cy: "10", r: "1.3", fill: "currentColor" }),
1097
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "1.3", fill: "currentColor" }),
1098
+ /* @__PURE__ */ jsx9("circle", { cx: "15.4", cy: "10", r: "1.3", fill: "currentColor" })
1099
+ ] }),
1100
+ "ellipsis-vertical": /* @__PURE__ */ jsxs6(Fragment, { children: [
1101
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "4.6", r: "1.3", fill: "currentColor" }),
1102
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "1.3", fill: "currentColor" }),
1103
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "15.4", r: "1.3", fill: "currentColor" })
1104
+ ] }),
1105
+ "envelope-open": /* @__PURE__ */ jsxs6(Fragment, { children: [
1106
+ /* @__PURE__ */ jsx9("path", { d: "M3.5 8.4 10 3.5l6.5 4.9V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V8.4Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1107
+ /* @__PURE__ */ jsx9("path", { d: "m3.5 8.4 6.5 4.7 6.5-4.7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1108
+ ] }),
1109
+ "eye": /* @__PURE__ */ jsxs6(Fragment, { children: [
1110
+ /* @__PURE__ */ jsx9("path", { d: "M2.5 10s2.8-5 7.5-5 7.5 5 7.5 5-2.8 5-7.5 5-7.5-5-7.5-5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1111
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1112
+ ] }),
1113
+ "eye-off": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3 3l14 14M8.4 8.5A2.5 2.5 0 0 0 11.5 11.6M6.3 6.4C4 7.8 2.5 10 2.5 10s2.8 5 7.5 5c1.3 0 2.5-.4 3.5-.9M9 5.1c.3 0 .7-.1 1-.1 4.7 0 7.5 5 7.5 5s-.6 1.1-1.8 2.3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1057
1114
  "film": /* @__PURE__ */ jsxs6(Fragment, { children: [
1058
1115
  /* @__PURE__ */ jsx9("path", { d: "M3.5 8.5h13V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V8.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1059
1116
  /* @__PURE__ */ jsx9("path", { d: "m3.5 8.5 1-3.4 11.6 1.7-.6 1.7M7.6 5.6 6.6 8.2M11.2 6.1l-1 2.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
@@ -1062,14 +1119,23 @@ var GLYPHS = {
1062
1119
  "flame": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 3c-2.5 3-4.5 5.2-4.5 7.4a4.5 4.5 0 0 0 9 0C14.5 8.2 12.5 6 10 3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1063
1120
  "folder": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3.5 5.5A1.5 1.5 0 0 1 5 4h3l1.5 2H15a1.5 1.5 0 0 1 1.5 1.5V14a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 14V5.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1064
1121
  "forward": /* @__PURE__ */ jsxs6(Fragment, { children: [
1065
- /* @__PURE__ */ jsx9("path", { d: "M14.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1066
- /* @__PURE__ */ jsx9("path", { d: "M5 5.6v8.8a.6.6 0 0 0 .93.5l6.47-4.4a.6.6 0 0 0 0-1L5.93 5.1a.6.6 0 0 0-.93.5Z", fill: "currentColor" })
1122
+ /* @__PURE__ */ jsx9("path", { d: "M12 5.5 16.5 10 12 14.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1123
+ /* @__PURE__ */ jsx9("path", { d: "M16.5 10h-6a6 6 0 0 0-6 6v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1067
1124
  ] }),
1068
1125
  "garage": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3 9.5 10 4l7 5.5M5 8.5V16h10V8.5M7 11h6M7 13.5h6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1069
1126
  "gear": /* @__PURE__ */ jsxs6(Fragment, { children: [
1070
1127
  /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", strokeWidth: "1.5" }),
1071
1128
  /* @__PURE__ */ jsx9("path", { d: "M10 2.5v3M10 14.5v3M2.5 10h3M14.5 10h3M4.7 4.7l2.1 2.1M13.2 13.2l2.1 2.1M15.3 4.7l-2.1 2.1M6.8 13.2l-2.1 2.1", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
1072
1129
  ] }),
1130
+ "gift": /* @__PURE__ */ jsxs6(Fragment, { children: [
1131
+ /* @__PURE__ */ jsx9("path", { d: "M3.5 8.5h13V16a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1V8.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1132
+ /* @__PURE__ */ jsx9("path", { d: "M2.5 6h15v2.5h-15V6ZM10 6v11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1133
+ /* @__PURE__ */ jsx9("path", { d: "M10 6S8.8 3 7 3a1.8 1.8 0 0 0 0 3h3Zm0 0s1.2-3 3-3a1.8 1.8 0 0 1 0 3h-3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1134
+ ] }),
1135
+ "globe": /* @__PURE__ */ jsxs6(Fragment, { children: [
1136
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "7.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1137
+ /* @__PURE__ */ jsx9("path", { d: "M2.5 10h15M10 2.5c2.2 2.3 3.3 4.8 3.3 7.5S12.2 15.2 10 17.5c-2.2-2.3-3.3-4.8-3.3-7.5S7.8 4.8 10 2.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1138
+ ] }),
1073
1139
  "grid": /* @__PURE__ */ jsxs6(Fragment, { children: [
1074
1140
  /* @__PURE__ */ jsx9("rect", { x: "3.5", y: "3.5", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
1075
1141
  /* @__PURE__ */ jsx9("rect", { x: "11", y: "3.5", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
@@ -1078,10 +1144,19 @@ var GLYPHS = {
1078
1144
  ] }),
1079
1145
  "heart": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 16.5S3.5 12.5 3.5 8.2A3.6 3.6 0 0 1 10 6a3.6 3.6 0 0 1 6.5 2.2c0 4.3-6.5 8.3-6.5 8.3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1080
1146
  "house": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3 9.5 10 4l7 5.5M5 8.5V16h10V8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1147
+ "image-off": /* @__PURE__ */ jsxs6(Fragment, { children: [
1148
+ /* @__PURE__ */ jsx9("path", { d: "M3 3l14 14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1149
+ /* @__PURE__ */ jsx9("path", { d: "M16.5 12.8V5.5a1 1 0 0 0-1-1H8.2m-3.7 0a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h9.3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1150
+ /* @__PURE__ */ jsx9("path", { d: "m4 13.5 3.2-3a1.4 1.4 0 0 1 1.9 0l1.4 1.3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1151
+ ] }),
1081
1152
  "info": /* @__PURE__ */ jsxs6(Fragment, { children: [
1082
1153
  /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
1083
1154
  /* @__PURE__ */ jsx9("path", { d: "M10 9v4M10 6.4h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1084
1155
  ] }),
1156
+ "key": /* @__PURE__ */ jsxs6(Fragment, { children: [
1157
+ /* @__PURE__ */ jsx9("circle", { cx: "7", cy: "7.2", r: "3.2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1158
+ /* @__PURE__ */ jsx9("path", { d: "m9.4 9.6 6.1 6.1M13.4 13.6l1.6-1.6M15.5 15.7l1.4-1.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1159
+ ] }),
1085
1160
  "lightbulb": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 3a5 5 0 0 0-2.5 9.3V14a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1.7A5 5 0 0 0 10 3ZM8.5 17h3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1086
1161
  "link": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M8.5 11.5a3 3 0 0 0 4.2 0l2.5-2.5a3 3 0 1 0-4.2-4.2l-1 1M11.5 8.5a3 3 0 0 0-4.2 0L4.8 11a3 3 0 1 0 4.2 4.2l1-1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1087
1162
  "lock": /* @__PURE__ */ jsxs6(Fragment, { children: [
@@ -1092,6 +1167,7 @@ var GLYPHS = {
1092
1167
  /* @__PURE__ */ jsx9("rect", { x: "3", y: "4.5", width: "14", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1093
1168
  /* @__PURE__ */ jsx9("path", { d: "m4.5 7 5.5 4 5.5-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1094
1169
  ] }),
1170
+ "menu": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3.5 6h13M3.5 10h13M3.5 14h13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1095
1171
  "message": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M5.5 4h9a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H8.5l-3 3v-3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1096
1172
  "mic": /* @__PURE__ */ jsxs6(Fragment, { children: [
1097
1173
  /* @__PURE__ */ jsx9("rect", { x: "7.5", y: "3.5", width: "5", height: "9", rx: "2.5", stroke: "currentColor", strokeWidth: "1.5" }),
@@ -1110,6 +1186,7 @@ var GLYPHS = {
1110
1186
  /* @__PURE__ */ jsx9("rect", { x: "3", y: "4", width: "14", height: "12", rx: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
1111
1187
  /* @__PURE__ */ jsx9("path", { d: "M6 7.5h4.5v3.5H6zM13 7.5h1M13 11h1M6 13.5h8", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" })
1112
1188
  ] }),
1189
+ "paperclip": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m13.5 7.5-5.3 5.3a1.8 1.8 0 0 1-2.5-2.5l6-6a3 3 0 0 1 4.2 4.2l-6.3 6.3a4.2 4.2 0 0 1-6-6L9 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1113
1190
  "pause": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M6 4.5h2.5v11H6zM11.5 4.5H14v11h-2.5z" }) }),
1114
1191
  "pencil": /* @__PURE__ */ jsxs6(Fragment, { children: [
1115
1192
  /* @__PURE__ */ jsx9("path", { d: "m4 16 .8-3.2 8.8-8.8a1.4 1.4 0 0 1 2 0l.4.4a1.4 1.4 0 0 1 0 2l-8.8 8.8L4 16Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
@@ -1124,6 +1201,10 @@ var GLYPHS = {
1124
1201
  /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "6.5", r: "3", stroke: "currentColor", strokeWidth: "1.5" }),
1125
1202
  /* @__PURE__ */ jsx9("path", { d: "M4 16.5a6 6 0 0 1 12 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1126
1203
  ] }),
1204
+ "person-plus": /* @__PURE__ */ jsxs6(Fragment, { children: [
1205
+ /* @__PURE__ */ jsx9("circle", { cx: "8", cy: "7", r: "3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1206
+ /* @__PURE__ */ jsx9("path", { d: "M2.5 16.5c.6-3 3-4.5 5.5-4.5s4.9 1.5 5.5 4.5M15 7.5v5M12.5 10h5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1207
+ ] }),
1127
1208
  "photo": /* @__PURE__ */ jsxs6(Fragment, { children: [
1128
1209
  /* @__PURE__ */ jsx9("rect", { x: "3.5", y: "4.5", width: "13", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1129
1210
  /* @__PURE__ */ jsx9("circle", { cx: "7.5", cy: "8", r: "1.2", fill: "currentColor" }),
@@ -1135,8 +1216,18 @@ var GLYPHS = {
1135
1216
  ] }),
1136
1217
  "play": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M7 4.9v10.2a.6.6 0 0 0 .92.5l8-5.1a.6.6 0 0 0 0-1l-8-5.1a.6.6 0 0 0-.92.5Z" }) }),
1137
1218
  "plus": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 4v12M4 10h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1219
+ "power": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 3v6.5M6 6.2a5.5 5.5 0 1 0 8 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1138
1220
  "refresh": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M15.8 10A5.8 5.8 0 1 1 13 5.1M15.8 3.5v3.2h-3.2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1139
1221
  "repeat": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M5.5 8V7A2.5 2.5 0 0 1 8 4.5h6.5M12.5 2.5l2 2-2 2M14.5 12v1a2.5 2.5 0 0 1-2.5 2.5H5.5M7.5 17.5l-2-2 2-2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1222
+ "reply": /* @__PURE__ */ jsxs6(Fragment, { children: [
1223
+ /* @__PURE__ */ jsx9("path", { d: "M8 5.5 3.5 10 8 14.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1224
+ /* @__PURE__ */ jsx9("path", { d: "M3.5 10h6a6 6 0 0 1 6 6v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1225
+ ] }),
1226
+ "reply-all": /* @__PURE__ */ jsxs6(Fragment, { children: [
1227
+ /* @__PURE__ */ jsx9("path", { d: "M7 5.5 2.5 10 7 14.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1228
+ /* @__PURE__ */ jsx9("path", { d: "M11.5 5.5 7 10l4.5 4.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1229
+ /* @__PURE__ */ jsx9("path", { d: "M7 10h5.5a5 5 0 0 1 5 5v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1230
+ ] }),
1140
1231
  "search": /* @__PURE__ */ jsxs6(Fragment, { children: [
1141
1232
  /* @__PURE__ */ jsx9("circle", { cx: "9", cy: "9", r: "5.5", stroke: "currentColor", strokeWidth: "1.5" }),
1142
1233
  /* @__PURE__ */ jsx9("path", { d: "m13.5 13.5 3 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
@@ -1150,6 +1241,14 @@ var GLYPHS = {
1150
1241
  /* @__PURE__ */ jsx9("path", { d: "M10 3l6 2v5c0 3.5-2.5 5.8-6 7-3.5-1.2-6-3.5-6-7V5l6-2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1151
1242
  /* @__PURE__ */ jsx9("path", { d: "m7.5 10 1.8 1.8L13 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1152
1243
  ] }),
1244
+ "skip-back": /* @__PURE__ */ jsxs6(Fragment, { children: [
1245
+ /* @__PURE__ */ jsx9("path", { d: "M5.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1246
+ /* @__PURE__ */ jsx9("path", { d: "M15 5.6v8.8a.6.6 0 0 1-.93.5L7.6 10.5a.6.6 0 0 1 0-1l6.47-4.4a.6.6 0 0 1 .93.5Z", fill: "currentColor" })
1247
+ ] }),
1248
+ "skip-forward": /* @__PURE__ */ jsxs6(Fragment, { children: [
1249
+ /* @__PURE__ */ jsx9("path", { d: "M14.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1250
+ /* @__PURE__ */ jsx9("path", { d: "M5 5.6v8.8a.6.6 0 0 0 .93.5l6.47-4.4a.6.6 0 0 0 0-1L5.93 5.1a.6.6 0 0 0-.93.5Z", fill: "currentColor" })
1251
+ ] }),
1153
1252
  "sliders": /* @__PURE__ */ jsxs6(Fragment, { children: [
1154
1253
  /* @__PURE__ */ jsx9("path", { d: "M3.5 6.5h5M12 6.5h4.5M3.5 13.5h3M10 13.5h6.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
1155
1254
  /* @__PURE__ */ jsx9("circle", { cx: "10.2", cy: "6.5", r: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
@@ -1173,6 +1272,7 @@ var GLYPHS = {
1173
1272
  /* @__PURE__ */ jsx9("rect", { x: "3", y: "6", width: "14", height: "9.5", rx: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
1174
1273
  /* @__PURE__ */ jsx9("path", { d: "M7 17.5h6M7.5 2.5 10 5l2.5-2.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1175
1274
  ] }),
1275
+ "upload": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 16.5v-9M6.5 10.5l3.5-3 3.5 3M4 3.5h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1176
1276
  "warning": /* @__PURE__ */ jsxs6(Fragment, { children: [
1177
1277
  /* @__PURE__ */ jsx9("path", { d: "M10 3.5 18 17H2L10 3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1178
1278
  /* @__PURE__ */ jsx9("path", { d: "M10 8.5V12M10 14.5h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
@@ -2312,6 +2412,194 @@ var ContextMenuTarget = forwardRef17(
2312
2412
  return /* @__PURE__ */ jsx21(Component, { ref, "data-b-contextmenu": menu, ...rest, children });
2313
2413
  }
2314
2414
  );
2415
+
2416
+ // src/scroll.tsx
2417
+ import { useCallback as useCallback2, useEffect as useEffect5, useState as useState3 } from "react";
2418
+ function readGeometry(el) {
2419
+ const page = !el || el === document.documentElement || el === document.body;
2420
+ const box = page ? document.documentElement : el;
2421
+ const x = page ? window.scrollX : el.scrollLeft;
2422
+ const y = page ? window.scrollY : el.scrollTop;
2423
+ const width = box.clientWidth, height = box.clientHeight;
2424
+ const contentWidth = box.scrollWidth, contentHeight = box.scrollHeight;
2425
+ return {
2426
+ x,
2427
+ y,
2428
+ width,
2429
+ height,
2430
+ contentWidth,
2431
+ contentHeight,
2432
+ progressX: contentWidth > width ? Math.min(1, x / (contentWidth - width)) : 0,
2433
+ progressY: contentHeight > height ? Math.min(1, y / (contentHeight - height)) : 0
2434
+ };
2435
+ }
2436
+ function useScrollGeometry(ref, onChange) {
2437
+ const [geometry, setGeometry] = useState3(null);
2438
+ useEffect5(() => {
2439
+ const el = ref?.current ?? null;
2440
+ const page = !el || el === document.documentElement || el === document.body;
2441
+ const target = page ? window : el;
2442
+ let queued = false;
2443
+ const flush = () => {
2444
+ queued = false;
2445
+ const g = readGeometry(el);
2446
+ setGeometry(g);
2447
+ onChange?.(g);
2448
+ };
2449
+ const on = () => {
2450
+ if (!queued) {
2451
+ queued = true;
2452
+ requestAnimationFrame(flush);
2453
+ }
2454
+ };
2455
+ target.addEventListener("scroll", on, { passive: true });
2456
+ const ro = !page && "ResizeObserver" in window ? new ResizeObserver(on) : null;
2457
+ if (ro && el) ro.observe(el);
2458
+ else window.addEventListener("resize", on);
2459
+ flush();
2460
+ return () => {
2461
+ target.removeEventListener("scroll", on);
2462
+ if (ro) ro.disconnect();
2463
+ else window.removeEventListener("resize", on);
2464
+ };
2465
+ }, [ref?.current]);
2466
+ return geometry;
2467
+ }
2468
+ function useVisible(ref, { threshold = 0.5 } = {}) {
2469
+ const [visible, setVisible] = useState3(false);
2470
+ useEffect5(() => {
2471
+ const el = ref.current;
2472
+ if (!el) return;
2473
+ if (!("IntersectionObserver" in window)) {
2474
+ setVisible(true);
2475
+ return;
2476
+ }
2477
+ const io = new IntersectionObserver(
2478
+ (entries) => {
2479
+ for (const entry of entries) {
2480
+ setVisible(threshold === 0 ? entry.isIntersecting : entry.intersectionRatio >= threshold);
2481
+ }
2482
+ },
2483
+ { threshold: threshold === 0 ? [0] : [0, threshold] }
2484
+ );
2485
+ io.observe(el);
2486
+ return () => io.disconnect();
2487
+ }, [ref.current, threshold]);
2488
+ return visible;
2489
+ }
2490
+ function useSnapPosition(ref) {
2491
+ const [current, setCurrent] = useState3({ id: null, index: -1 });
2492
+ const items = useCallback2(() => ref.current ? Array.from(ref.current.children).filter((c) => !c.hidden) : [], [ref]);
2493
+ useEffect5(() => {
2494
+ const box = ref.current;
2495
+ if (!box) return;
2496
+ const announce = (el) => {
2497
+ if (!el) return;
2498
+ const list = items();
2499
+ const index = list.indexOf(el);
2500
+ if (index >= 0) setCurrent({ id: el.id || null, index });
2501
+ };
2502
+ const nearest = () => {
2503
+ const list = items();
2504
+ const horizontal = box.scrollWidth > box.clientWidth;
2505
+ const origin = box.getBoundingClientRect();
2506
+ let best = null, distance = Infinity;
2507
+ for (const c of list) {
2508
+ const r = c.getBoundingClientRect();
2509
+ const d = Math.abs(horizontal ? r.left - origin.left : r.top - origin.top);
2510
+ if (d < distance) {
2511
+ distance = d;
2512
+ best = c;
2513
+ }
2514
+ }
2515
+ return best;
2516
+ };
2517
+ let timer;
2518
+ const native = "onscrollsnapchange" in box;
2519
+ const onSnap = (e) => {
2520
+ const ev = e;
2521
+ announce(ev.snapTargetInline || ev.snapTargetBlock);
2522
+ };
2523
+ const settle = () => {
2524
+ clearTimeout(timer);
2525
+ timer = setTimeout(() => announce(nearest()), 90);
2526
+ };
2527
+ if (native) box.addEventListener("scrollsnapchange", onSnap);
2528
+ else box.addEventListener("onscrollend" in box ? "scrollend" : "scroll", settle, { passive: true });
2529
+ announce(nearest());
2530
+ return () => {
2531
+ box.removeEventListener("scrollsnapchange", onSnap);
2532
+ box.removeEventListener("scrollend", settle);
2533
+ box.removeEventListener("scroll", settle);
2534
+ clearTimeout(timer);
2535
+ };
2536
+ }, [ref.current]);
2537
+ const to = useCallback2(
2538
+ (target) => {
2539
+ const list = items();
2540
+ const el = typeof target === "number" ? list[target] : list.find((c) => c.id === target);
2541
+ el?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
2542
+ },
2543
+ [items]
2544
+ );
2545
+ return { ...current, to };
2546
+ }
2547
+ var HAPTICS = {
2548
+ selection: [8],
2549
+ impact: [16],
2550
+ success: [10, 30, 20],
2551
+ warning: [25, 40, 25],
2552
+ error: [40, 30, 40, 30, 60]
2553
+ };
2554
+ function haptic(kind = "selection") {
2555
+ if (typeof navigator === "undefined") return false;
2556
+ if (typeof navigator.vibrate === "function") {
2557
+ navigator.vibrate(HAPTICS[kind]);
2558
+ return true;
2559
+ }
2560
+ if (/iphone|ipad|ipod/i.test(navigator.userAgent)) {
2561
+ let sw = document.getElementById("b-haptic-switch");
2562
+ if (!sw) {
2563
+ sw = document.createElement("input");
2564
+ sw.type = "checkbox";
2565
+ sw.id = "b-haptic-switch";
2566
+ sw.tabIndex = -1;
2567
+ sw.setAttribute("switch", "");
2568
+ sw.setAttribute("aria-hidden", "true");
2569
+ sw.style.cssText = "position:fixed;inset:auto auto 0 0;width:1px;height:1px;opacity:0;pointer-events:none";
2570
+ document.body.appendChild(sw);
2571
+ }
2572
+ sw.click();
2573
+ return true;
2574
+ }
2575
+ return false;
2576
+ }
2577
+ var PERSIST = "barua-persist:";
2578
+ function usePersistedState(key, initial) {
2579
+ const [value, setValue] = useState3(() => {
2580
+ if (typeof window === "undefined") return initial;
2581
+ try {
2582
+ const raw = localStorage.getItem(PERSIST + key);
2583
+ return raw === null ? initial : JSON.parse(raw);
2584
+ } catch {
2585
+ return initial;
2586
+ }
2587
+ });
2588
+ const set = useCallback2(
2589
+ (next) => {
2590
+ setValue((prev) => {
2591
+ const resolved = typeof next === "function" ? next(prev) : next;
2592
+ try {
2593
+ localStorage.setItem(PERSIST + key, JSON.stringify(resolved));
2594
+ } catch {
2595
+ }
2596
+ return resolved;
2597
+ });
2598
+ },
2599
+ [key]
2600
+ );
2601
+ return [value, set];
2602
+ }
2315
2603
  export {
2316
2604
  Accordion,
2317
2605
  Account,
@@ -2606,8 +2894,13 @@ export {
2606
2894
  block,
2607
2895
  buttonClasses,
2608
2896
  cn,
2897
+ haptic,
2609
2898
  iconNames,
2610
2899
  useBaruaTheme,
2611
- useToast
2900
+ usePersistedState,
2901
+ useScrollGeometry,
2902
+ useSnapPosition,
2903
+ useToast,
2904
+ useVisible
2612
2905
  };
2613
2906
  //# sourceMappingURL=index.js.map