@dragunio/fe-libs 0.1.3 → 0.1.5

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
@@ -9,9 +9,9 @@ var __export = (target, all) => {
9
9
  };
10
10
  var __copyProps = (to, from, except, desc) => {
11
11
  if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ for (let key2 of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key2) && key2 !== except)
14
+ __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
15
15
  }
16
16
  return to;
17
17
  };
@@ -54,9 +54,26 @@ __export(index_exports, {
54
54
  TextInput: () => TextInput,
55
55
  Toggle: () => Toggle,
56
56
  Tooltip: () => Tooltip,
57
+ arrow_left: () => arrow_left,
58
+ check_square_fill: () => check_square_fill,
59
+ chevron_down: () => chevron_down,
60
+ chevron_left: () => chevron_left,
61
+ chevron_right: () => chevron_right,
62
+ chevron_up: () => chevron_up,
63
+ copy: () => copy,
57
64
  formatNumber: () => formatNumber,
58
65
  getIconSize: () => getIconSize,
59
- message: () => message
66
+ key: () => key,
67
+ lock: () => lock,
68
+ lock_unlocked: () => lock_unlocked,
69
+ log_out: () => log_out,
70
+ message: () => message,
71
+ minus_square: () => minus_square,
72
+ plus: () => plus,
73
+ plus_square: () => plus_square,
74
+ search: () => search,
75
+ trash: () => trash,
76
+ x_close: () => x_close
60
77
  });
61
78
  module.exports = __toCommonJS(index_exports);
62
79
 
@@ -126,9 +143,96 @@ var Button = (0, import_react.forwardRef)(
126
143
  );
127
144
  Button.displayName = "Button";
128
145
 
129
- // packages/icons/src/index.tsx
146
+ // packages/icons/src/svgItems/general.tsx
130
147
  var import_jsx_runtime2 = require("react/jsx-runtime");
148
+ var primaryColor = "#101828";
131
149
  var iconProps = ({ size, ...props }) => ({
150
+ width: size ?? 20,
151
+ height: size ?? 20,
152
+ fill: primaryColor,
153
+ viewBox: "0 0 24 24",
154
+ "aria-hidden": true,
155
+ ...props
156
+ });
157
+ var plus = (props) => {
158
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12 4.1499C12.4694 4.1499 12.85 4.53046 12.85 4.9999V11.1499H19C19.4694 11.1499 19.85 11.5305 19.85 11.9999C19.85 12.4693 19.4694 12.8499 19 12.8499H12.85V18.9999C12.85 19.4693 12.4694 19.8499 12 19.8499C11.5306 19.8499 11.15 19.4693 11.15 18.9999V12.8499H4.99999C4.53055 12.8499 4.14999 12.4693 4.14999 11.9999C4.14999 11.5305 4.53055 11.1499 4.99999 11.1499H11.15V4.9999C11.15 4.53046 11.5306 4.1499 12 4.1499Z", fill: props.fill }) });
159
+ };
160
+ var plus_square = (props) => {
161
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.76413 2.1499H16.2359C17.0455 2.14989 17.7046 2.14989 18.2396 2.1936C18.7924 2.23877 19.2872 2.33481 19.7479 2.56953C20.4723 2.93864 21.0613 3.52762 21.4304 4.25204C21.6651 4.7127 21.7611 5.20747 21.8063 5.76029C21.85 6.29532 21.85 6.95444 21.85 7.7641V16.2357C21.85 17.0454 21.85 17.7045 21.8063 18.2395C21.7611 18.7923 21.6651 19.2871 21.4304 19.7478C21.0613 20.4722 20.4723 21.0612 19.7479 21.4303C19.2872 21.665 18.7924 21.761 18.2396 21.8062C17.7046 21.8499 17.0455 21.8499 16.2358 21.8499H7.76419C6.95454 21.8499 6.29542 21.8499 5.76038 21.8062C5.20756 21.761 4.7128 21.665 4.25213 21.4303C3.52771 21.0612 2.93873 20.4722 2.56962 19.7478C2.3349 19.2871 2.23886 18.7923 2.19369 18.2395C2.14998 17.7045 2.14998 17.0454 2.14999 16.2358V7.76404C2.14998 6.95441 2.14998 6.29531 2.19369 5.76029C2.23886 5.20747 2.3349 4.7127 2.56962 4.25204C2.93873 3.52762 3.52771 2.93864 4.25213 2.56953C4.7128 2.33481 5.20756 2.23877 5.76038 2.1936C6.2954 2.14989 6.9545 2.14989 7.76413 2.1499ZM5.89882 3.88795C5.45113 3.92453 5.20498 3.99198 5.02392 4.08424C4.61937 4.29037 4.29046 4.61928 4.08433 5.02382C3.99207 5.20489 3.92462 5.45103 3.88804 5.89873C3.85066 6.35634 3.84999 6.9458 3.84999 7.7999V16.1999C3.84999 17.054 3.85066 17.6435 3.88804 18.1011C3.92462 18.5488 3.99207 18.7949 4.08433 18.976C4.29046 19.3805 4.61937 19.7094 5.02392 19.9156C5.20498 20.0078 5.45113 20.0753 5.89882 20.1119C6.35643 20.1492 6.94589 20.1499 7.79999 20.1499H16.2C17.0541 20.1499 17.6436 20.1492 18.1012 20.1119C18.5489 20.0753 18.795 20.0078 18.9761 19.9156C19.3806 19.7094 19.7095 19.3805 19.9157 18.976C20.0079 18.7949 20.0754 18.5488 20.1119 18.1011C20.1493 17.6435 20.15 17.054 20.15 16.1999V7.7999C20.15 6.9458 20.1493 6.35634 20.1119 5.89873C20.0754 5.45103 20.0079 5.20489 19.9157 5.02382C19.7095 4.61928 19.3806 4.29037 18.9761 4.08424C18.795 3.99198 18.5489 3.92453 18.1012 3.88795C17.6436 3.85056 17.0541 3.8499 16.2 3.8499H7.79999C6.94589 3.8499 6.35643 3.85056 5.89882 3.88795ZM12 7.1499C12.4694 7.1499 12.85 7.53046 12.85 7.9999V11.1499H16C16.4694 11.1499 16.85 11.5305 16.85 11.9999C16.85 12.4693 16.4694 12.8499 16 12.8499H12.85V15.9999C12.85 16.4693 12.4694 16.8499 12 16.8499C11.5306 16.8499 11.15 16.4693 11.15 15.9999V12.8499H7.99999C7.53055 12.8499 7.14999 12.4693 7.14999 11.9999C7.14999 11.5305 7.53055 11.1499 7.99999 11.1499H11.15V7.9999C11.15 7.53046 11.5306 7.1499 12 7.1499Z", fill: props.fill }) });
162
+ };
163
+ var arrow_left = (props) => {
164
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.6011 4.39898C12.933 4.73093 12.933 5.26912 12.6011 5.60107L7.05211 11.15H19C19.4695 11.15 19.85 11.5306 19.85 12C19.85 12.4695 19.4695 12.85 19 12.85H7.05211L12.6011 18.399C12.933 18.7309 12.933 19.2691 12.6011 19.6011C12.2691 19.933 11.7309 19.933 11.399 19.6011L4.39898 12.6011C4.06704 12.2691 4.06704 11.7309 4.39898 11.399L11.399 4.39898C11.7309 4.06704 12.2691 4.06704 12.6011 4.39898Z", fill: props.fill }) });
165
+ };
166
+ var log_out = (props) => {
167
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.05948 2.70693L9.11224 2.8239C9.12546 2.82537 9.13849 2.82682 9.15133 2.82824C9.40732 2.85665 9.58836 2.87674 9.75082 2.90904C11.4318 3.24326 12.6894 4.64836 12.8359 6.35593C12.8501 6.52096 12.8501 6.70312 12.85 6.96069C12.85 6.9736 12.85 6.9867 12.85 7C12.85 7.46944 12.4695 7.85 12 7.85C11.5306 7.85 11.15 7.46944 11.15 7C11.15 6.68742 11.1493 6.58403 11.1422 6.50129C11.0603 5.54771 10.358 4.76305 9.4193 4.57641C9.33785 4.56021 9.23517 4.54802 8.92451 4.51351L7.9031 4.40002C7.12368 4.31341 6.58335 4.25388 6.16078 4.23712C5.74477 4.22061 5.51369 4.25002 5.34475 4.30408C4.76229 4.49047 4.28677 4.91608 4.0372 5.4744C3.96482 5.63633 3.91007 5.86275 3.88053 6.27804C3.85053 6.69988 3.85002 7.24347 3.85002 8.02769V15.9723C3.85002 16.7565 3.85053 17.3001 3.88053 17.722C3.91007 18.1373 3.96482 18.3637 4.0372 18.5256C4.28677 19.0839 4.76229 19.5095 5.34475 19.6959C5.51368 19.75 5.74476 19.7794 6.16079 19.7629C6.58337 19.7461 7.12369 19.6866 7.9031 19.6L8.92451 19.4865C9.23507 19.452 9.33787 19.4398 9.41929 19.4236C10.358 19.237 11.0603 18.4523 11.1422 17.4987C11.1493 17.416 11.15 17.3126 11.15 17C11.15 16.5306 11.5306 16.15 12 16.15C12.4695 16.15 12.85 16.5306 12.85 17L12.85 17.0393C12.8501 17.2969 12.8501 17.479 12.8359 17.6441C12.6894 19.3516 11.4318 20.7567 9.75082 21.091C9.58838 21.1233 9.40722 21.1434 9.1513 21.1718C9.13847 21.1732 9.12545 21.1746 9.11224 21.1761L8.05936 21.2931C7.31879 21.3754 6.71831 21.4421 6.22818 21.4615C5.72456 21.4815 5.26724 21.456 4.82663 21.315C3.78362 20.9813 2.93211 20.2191 2.4852 19.2194C2.29641 18.797 2.22057 18.3453 2.18481 17.8426C2.15001 17.3533 2.15002 16.749 2.15002 16.0038V7.99615C2.15002 7.25096 2.15001 6.64674 2.18481 6.15743C2.22057 5.65469 2.29641 5.20298 2.4852 4.78064C2.93211 3.78087 3.78362 3.01873 4.82663 2.68497C5.26724 2.54397 5.72456 2.51847 6.22817 2.53845C6.71833 2.5579 7.31885 2.62463 8.05948 2.70693ZM15.399 6.39896C15.7309 6.06701 16.2691 6.06701 16.6011 6.39896L21.6011 11.399C21.933 11.7309 21.933 12.2691 21.6011 12.601L16.6011 17.601C16.2691 17.933 15.7309 17.933 15.399 17.601C15.067 17.2691 15.067 16.7309 15.399 16.399L18.9479 12.85H9.00003C8.53058 12.85 8.15003 12.4694 8.15003 12C8.15003 11.5306 8.53058 11.15 9.00003 11.15H18.9479L15.399 7.60104C15.067 7.26909 15.067 6.7309 15.399 6.39896Z", fill: props.fill }) });
168
+ };
169
+ var search = (props) => {
170
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11 3.8499C7.05116 3.8499 3.84999 7.05107 3.84999 10.9999C3.84999 14.9487 7.05116 18.1499 11 18.1499C12.9306 18.1499 14.6825 17.3847 15.9689 16.1411C15.993 16.109 16.0197 16.0781 16.049 16.0489C16.0782 16.0196 16.109 15.9929 16.1412 15.9689C17.3848 14.6824 18.15 12.9305 18.15 10.9999C18.15 7.05107 14.9488 3.8499 11 3.8499ZM17.8302 16.628C19.092 15.0984 19.85 13.1377 19.85 10.9999C19.85 6.11218 15.8877 2.1499 11 2.1499C6.11227 2.1499 2.14999 6.11218 2.14999 10.9999C2.14999 15.8876 6.11227 19.8499 11 19.8499C13.1378 19.8499 15.0985 19.0919 16.6281 17.8301L20.399 21.6009C20.7309 21.9329 21.2691 21.9329 21.601 21.6009C21.933 21.269 21.933 20.7308 21.601 20.3989L17.8302 16.628Z", fill: props.fill }) });
171
+ };
172
+ var x_close = (props) => {
173
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.25478 5.25441C5.59399 4.9152 6.14397 4.9152 6.48318 5.25441L12.0004 10.7716L17.5176 5.25441C17.8568 4.9152 18.4067 4.9152 18.746 5.25441C19.0852 5.59363 19.0852 6.1436 18.746 6.48282L13.2288 12L18.746 17.5172C19.0852 17.8564 19.0852 18.4064 18.746 18.7456C18.4067 19.0848 17.8568 19.0848 17.5176 18.7456L12.0004 13.2284L6.48318 18.7456C6.14397 19.0848 5.59399 19.0848 5.25478 18.7456C4.91556 18.4064 4.91556 17.8564 5.25478 17.5172L10.772 12L5.25478 6.48282C4.91556 6.1436 4.91556 5.59363 5.25478 5.25441Z", fill: props.fill }) });
174
+ };
175
+ var minus_square = (props) => {
176
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.76416 2.15002H16.2359C17.0455 2.15002 17.7046 2.15001 18.2396 2.19372C18.7925 2.23889 19.2872 2.33493 19.7479 2.56965C20.4723 2.93876 21.0613 3.52774 21.4304 4.25216C21.6651 4.71283 21.7612 5.20759 21.8063 5.76041C21.85 6.29545 21.85 6.95457 21.85 7.76422V16.2358C21.85 17.0455 21.85 17.7046 21.8063 18.2396C21.7612 18.7925 21.6651 19.2872 21.4304 19.7479C21.0613 20.4723 20.4723 21.0613 19.7479 21.4304C19.2872 21.6651 18.7925 21.7612 18.2396 21.8063C17.7046 21.85 17.0455 21.85 16.2358 21.85H7.76422C6.95457 21.85 6.29545 21.85 5.76041 21.8063C5.20759 21.7612 4.71283 21.6651 4.25216 21.4304C3.52774 21.0613 2.93876 20.4723 2.56965 19.7479C2.33493 19.2872 2.23889 18.7925 2.19372 18.2396C2.15001 17.7046 2.15002 17.0455 2.15002 16.2359V7.76416C2.15002 6.95453 2.15001 6.29543 2.19372 5.76041C2.23889 5.20759 2.33493 4.71283 2.56965 4.25216C2.93876 3.52774 3.52774 2.93876 4.25216 2.56965C4.71283 2.33493 5.20759 2.23889 5.76041 2.19372C6.29543 2.15001 6.95453 2.15002 7.76416 2.15002ZM5.89885 3.88807C5.45116 3.92465 5.20502 3.9921 5.02395 4.08436C4.6194 4.29049 4.29049 4.6194 4.08436 5.02395C3.9921 5.20502 3.92465 5.45116 3.88807 5.89885C3.85069 6.35646 3.85002 6.94592 3.85002 7.80002V16.2C3.85002 17.0541 3.85069 17.6436 3.88807 18.1012C3.92465 18.5489 3.9921 18.795 4.08436 18.9761C4.29049 19.3807 4.6194 19.7096 5.02395 19.9157C5.20502 20.0079 5.45116 20.0754 5.89885 20.112C6.35646 20.1494 6.94592 20.15 7.80002 20.15H16.2C17.0541 20.15 17.6436 20.1494 18.1012 20.112C18.5489 20.0754 18.795 20.0079 18.9761 19.9157C19.3807 19.7096 19.7096 19.3807 19.9157 18.9761C20.0079 18.795 20.0754 18.5489 20.112 18.1012C20.1494 17.6436 20.15 17.0541 20.15 16.2V7.80002C20.15 6.94592 20.1494 6.35646 20.112 5.89885C20.0754 5.45116 20.0079 5.20502 19.9157 5.02395C19.7096 4.6194 19.3807 4.29049 18.9761 4.08436C18.795 3.9921 18.5489 3.92465 18.1012 3.88807C17.6436 3.85069 17.0541 3.85002 16.2 3.85002H7.80002C6.94592 3.85002 6.35646 3.85069 5.89885 3.88807ZM7.15002 12C7.15002 11.5306 7.53058 11.15 8.00002 11.15H16C16.4695 11.15 16.85 11.5306 16.85 12C16.85 12.4695 16.4695 12.85 16 12.85H8.00002C7.53058 12.85 7.15002 12.4695 7.15002 12Z", fill: props.fill }) });
177
+ };
178
+ var trash = (props) => {
179
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.15002 3.00002C8.15002 2.53058 8.53058 2.15002 9.00002 2.15002H15C15.4695 2.15002 15.85 2.53058 15.85 3.00002C15.85 3.46947 15.4695 3.85002 15 3.85002H9.00002C8.53058 3.85002 8.15002 3.46947 8.15002 3.00002ZM4.99342 5.15002H3.00002C2.53058 5.15002 2.15002 5.53058 2.15002 6.00002C2.15002 6.46947 2.53058 6.85002 3.00002 6.85002H4.2048L4.85549 16.6103C4.90614 17.3702 4.94747 17.9902 5.0213 18.4931C5.09776 19.0138 5.2174 19.4774 5.46145 19.9058C5.84658 20.5818 6.42751 21.1253 7.12767 21.4646C7.57135 21.6796 8.04182 21.7682 8.56649 21.8098C9.07318 21.85 9.69462 21.85 10.4562 21.85H13.5438C14.3054 21.85 14.9269 21.85 15.4336 21.8098C15.9582 21.7682 16.4287 21.6796 16.8724 21.4646C17.5725 21.1253 18.1535 20.5818 18.5386 19.9058C18.7827 19.4774 18.9023 19.0138 18.9787 18.4931C19.0526 17.9902 19.0939 17.3702 19.1446 16.6103L19.7952 6.85002H21C21.4695 6.85002 21.85 6.46947 21.85 6.00002C21.85 5.53058 21.4695 5.15002 21 5.15002H19.0066C19.0017 5.14998 18.9967 5.14998 18.9917 5.15002H5.00832C5.00336 5.14998 4.99839 5.14998 4.99342 5.15002ZM18.0915 6.85002H5.90858L6.54943 16.4628C6.60294 17.2654 6.64039 17.8179 6.70327 18.2462C6.76464 18.6641 6.84175 18.8943 6.93857 19.0643C7.15364 19.4418 7.47805 19.7453 7.86905 19.9348C8.04507 20.0201 8.27988 20.0817 8.70101 20.1152C9.13249 20.1494 9.68627 20.15 10.4907 20.15H13.5094C14.3138 20.15 14.8676 20.1494 15.299 20.1152C15.7202 20.0817 15.955 20.0201 16.131 19.9348C16.522 19.7453 16.8464 19.4418 17.0615 19.0643C17.1583 18.8943 17.2354 18.6641 17.2968 18.2462C17.3597 17.8179 17.3971 17.2654 17.4506 16.4628L18.0915 6.85002ZM10 9.65002C10.4695 9.65002 10.85 10.0306 10.85 10.5V15.5C10.85 15.9695 10.4695 16.35 10 16.35C9.53058 16.35 9.15002 15.9695 9.15002 15.5V10.5C9.15002 10.0306 9.53058 9.65002 10 9.65002ZM14 9.65002C14.4695 9.65002 14.85 10.0306 14.85 10.5V15.5C14.85 15.9695 14.4695 16.35 14 16.35C13.5306 16.35 13.15 15.9695 13.15 15.5V10.5C13.15 10.0306 13.5306 9.65002 14 9.65002Z", fill: props.fill }) });
180
+ };
181
+ var copy = (props) => {
182
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M17.158 3.90158C16.5336 3.85056 15.7341 3.8499 14.6 3.8499H7.5C7.03056 3.8499 6.65 3.46934 6.65 2.9999C6.65 2.53046 7.03056 2.1499 7.5 2.1499L14.637 2.1499C15.7257 2.1499 16.5947 2.14989 17.2964 2.20722C18.016 2.26601 18.6342 2.3893 19.2019 2.67852C20.1144 3.14351 20.8564 3.88546 21.3214 4.79805C21.6106 5.36567 21.7339 5.98392 21.7927 6.70349C21.85 7.40523 21.85 8.2742 21.85 9.36297V16.4999C21.85 16.9693 21.4694 17.3499 21 17.3499C20.5306 17.3499 20.15 16.9693 20.15 16.4999V9.3999C20.15 8.26577 20.1493 7.46629 20.0983 6.84193C20.0481 6.22748 19.9534 5.85786 19.8067 5.56983C19.5047 4.97712 19.0228 4.49523 18.4301 4.19323C18.142 4.04648 17.7724 3.95178 17.158 3.90158ZM6.16622 5.6499H14.3338C14.8651 5.64989 15.3145 5.64988 15.6828 5.67997C16.0689 5.71152 16.4402 5.78031 16.7939 5.96053C17.3301 6.23377 17.7661 6.66977 18.0394 7.20603C18.2196 7.55974 18.2884 7.93102 18.3199 8.31709C18.35 8.68545 18.35 9.13485 18.35 9.66613V17.8337C18.35 18.365 18.35 18.8144 18.3199 19.1827C18.2884 19.5688 18.2196 19.9401 18.0394 20.2938C17.7661 20.83 17.3301 21.266 16.7939 21.5393C16.4402 21.7195 16.0689 21.7883 15.6828 21.8198C15.3144 21.8499 14.865 21.8499 14.3337 21.8499H6.16627C5.63498 21.8499 5.18557 21.8499 4.81719 21.8198C4.43112 21.7883 4.05984 21.7195 3.70613 21.5393C3.16987 21.266 2.73387 20.83 2.46063 20.2938C2.28041 19.9401 2.21162 19.5688 2.18007 19.1827C2.14998 18.8144 2.14999 18.365 2.15 17.8337V9.66612C2.14999 9.13485 2.14998 8.68545 2.18007 8.31709C2.21162 7.93102 2.28041 7.55974 2.46063 7.20603C2.73387 6.66977 3.16987 6.23377 3.70613 5.96053C4.05984 5.78031 4.43112 5.71152 4.81719 5.67997C5.18555 5.64988 5.63495 5.64989 6.16622 5.6499ZM4.95562 7.37433C4.67468 7.39728 4.55203 7.43748 4.47791 7.47525C4.26153 7.5855 4.0856 7.76143 3.97535 7.97781C3.93758 8.05193 3.89738 8.17458 3.87443 8.45552C3.85066 8.74639 3.85 9.12582 3.85 9.6999V17.7999C3.85 18.374 3.85066 18.7534 3.87443 19.0443C3.89738 19.3252 3.93758 19.4479 3.97535 19.522C4.0856 19.7384 4.26153 19.9143 4.47791 20.0246C4.55203 20.0623 4.67468 20.1025 4.95562 20.1255C5.24649 20.1492 5.62592 20.1499 6.2 20.1499H14.3C14.8741 20.1499 15.2535 20.1492 15.5444 20.1255C15.8253 20.1025 15.948 20.0623 16.0221 20.0246C16.2385 19.9143 16.4144 19.7384 16.5247 19.522C16.5624 19.4479 16.6026 19.3252 16.6256 19.0443C16.6493 18.7534 16.65 18.374 16.65 17.7999V9.6999C16.65 9.12582 16.6493 8.74639 16.6256 8.45552C16.6026 8.17458 16.5624 8.05193 16.5247 7.97781C16.4144 7.76143 16.2385 7.5855 16.0221 7.47525C15.948 7.43748 15.8253 7.39728 15.5444 7.37433C15.2535 7.35056 14.8741 7.3499 14.3 7.3499H6.2C5.62592 7.3499 5.24649 7.35056 4.95562 7.37433Z", fill: props.fill }) });
183
+ };
184
+ var check_square_fill = (props) => {
185
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16.2359 2.15039H7.76414C6.95452 2.15038 6.2954 2.15037 5.76039 2.19409C5.20757 2.23925 4.7128 2.3353 4.25214 2.57002C3.52771 2.93913 2.93874 3.5281 2.56963 4.25253C2.3349 4.71319 2.23886 5.20796 2.1937 5.76078C2.14998 6.29579 2.14999 6.95489 2.15 7.7645V16.2363C2.14999 17.0459 2.14998 17.705 2.1937 18.24C2.23886 18.7928 2.3349 19.2876 2.56963 19.7483C2.93874 20.4727 3.52771 21.0617 4.25214 21.4308C4.7128 21.6655 5.20757 21.7615 5.76039 21.8067C6.29542 21.8504 6.95454 21.8504 7.76419 21.8504H16.2358C17.0455 21.8504 17.7046 21.8504 18.2396 21.8067C18.7924 21.7615 19.2872 21.6655 19.7479 21.4308C20.4723 21.0617 21.0613 20.4727 21.4304 19.7483C21.6651 19.2876 21.7611 18.7928 21.8063 18.24C21.85 17.705 21.85 17.0459 21.85 16.2362V7.76459C21.85 6.95493 21.85 6.29581 21.8063 5.76078C21.7611 5.20796 21.6651 4.71319 21.4304 4.25253C21.0613 3.5281 20.4723 2.93913 19.7479 2.57002C19.2872 2.3353 18.7924 2.23925 18.2396 2.19409C17.7046 2.15037 17.0455 2.15038 16.2359 2.15039ZM17.101 9.60143C17.433 9.26949 17.433 8.7313 17.101 8.39935C16.7691 8.06741 16.2309 8.06741 15.899 8.39935L10.5 13.7983L8.10104 11.3994C7.7691 11.0674 7.23091 11.0674 6.89896 11.3994C6.56701 11.7313 6.56701 12.2695 6.89896 12.6014L9.89896 15.6014C10.2309 15.9334 10.7691 15.9334 11.101 15.6014L17.101 9.60143Z", fill: props.fill }) });
186
+ };
187
+
188
+ // packages/icons/src/svgItems/arrows.tsx
189
+ var import_jsx_runtime3 = require("react/jsx-runtime");
190
+ var primaryColor2 = "#101828";
191
+ var iconProps2 = ({ size, ...props }) => ({
192
+ width: size ?? 20,
193
+ height: size ?? 20,
194
+ fill: primaryColor2,
195
+ viewBox: "0 0 24 24",
196
+ "aria-hidden": true,
197
+ ...props
198
+ });
199
+ var chevron_right = (props) => {
200
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { ...iconProps2(props), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.39898 5.39898C8.73093 5.06704 9.26912 5.06704 9.60107 5.39898L15.6011 11.399C15.933 11.7309 15.933 12.2691 15.6011 12.6011L9.60107 18.6011C9.26912 18.933 8.73093 18.933 8.39898 18.6011C8.06704 18.2691 8.06704 17.7309 8.39898 17.399L13.7979 12L8.39898 6.60107C8.06704 6.26912 8.06704 5.73093 8.39898 5.39898Z", fill: props.fill }) });
201
+ };
202
+ var chevron_up = (props) => {
203
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { ...iconProps2(props), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.399 8.39898C11.7309 8.06704 12.2691 8.06704 12.6011 8.39898L18.6011 14.399C18.933 14.7309 18.933 15.2691 18.6011 15.6011C18.2691 15.933 17.7309 15.933 17.399 15.6011L12 10.2021L6.60107 15.6011C6.26912 15.933 5.73093 15.933 5.39898 15.6011C5.06704 15.2691 5.06704 14.7309 5.39898 14.399L11.399 8.39898Z", fill: "#101828" }) });
204
+ };
205
+ var chevron_left = (props) => {
206
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { ...iconProps2(props), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M15.6011 5.39898C15.933 5.73093 15.933 6.26912 15.6011 6.60107L10.2021 12L15.6011 17.399C15.933 17.7309 15.933 18.2691 15.6011 18.6011C15.2691 18.933 14.7309 18.933 14.399 18.6011L8.39898 12.6011C8.06704 12.2691 8.06704 11.7309 8.39898 11.399L14.399 5.39898C14.7309 5.06704 15.2691 5.06704 15.6011 5.39898Z", fill: "#101828" }) });
207
+ };
208
+ var chevron_down = (props) => {
209
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { ...iconProps2(props), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.39898 8.39898C5.73093 8.06704 6.26912 8.06704 6.60107 8.39898L12 13.7979L17.399 8.39898C17.7309 8.06704 18.2691 8.06704 18.6011 8.39898C18.933 8.73093 18.933 9.26912 18.6011 9.60107L12.6011 15.6011C12.2691 15.933 11.7309 15.933 11.399 15.6011L5.39898 9.60107C5.06704 9.26912 5.06704 8.73093 5.39898 8.39898Z", fill: "#101828" }) });
210
+ };
211
+
212
+ // packages/icons/src/svgItems/security.tsx
213
+ var import_jsx_runtime4 = require("react/jsx-runtime");
214
+ var primaryColor3 = "#101828";
215
+ var iconProps3 = ({ size, ...props }) => ({
216
+ width: size ?? 20,
217
+ height: size ?? 20,
218
+ fill: primaryColor3,
219
+ viewBox: "0 0 24 24",
220
+ "aria-hidden": true,
221
+ ...props
222
+ });
223
+ var key = (props) => {
224
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...iconProps3(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.15005 8.9999C8.15005 5.21675 11.2169 2.1499 15 2.1499C18.7832 2.1499 21.85 5.21675 21.85 8.9999C21.85 12.7831 18.7832 15.8499 15 15.8499C14.6884 15.8499 14.3812 15.829 14.0798 15.7885C13.8559 15.7584 13.7118 15.7392 13.6057 15.729C13.5482 15.7234 13.5186 15.7224 13.5082 15.7221C13.5037 15.7229 13.5002 15.7235 13.4973 15.724C13.4936 15.7259 13.4884 15.7286 13.4814 15.7324C13.4755 15.737 13.4609 15.7488 13.435 15.7723C13.3784 15.824 13.3051 15.8969 13.1802 16.0218L8.06971 21.1323C8.05819 21.1438 8.04652 21.1556 8.03471 21.1674C7.89856 21.3041 7.7426 21.4608 7.55245 21.5773C7.38693 21.6787 7.20647 21.7535 7.01771 21.7988C6.80087 21.8508 6.57985 21.8504 6.3869 21.85C6.37015 21.8499 6.35361 21.8499 6.3373 21.8499H4.57146C4.31611 21.8499 4.07591 21.8499 3.87403 21.8335C3.65471 21.8155 3.40692 21.774 3.16016 21.6483C2.81206 21.4709 2.52905 21.1879 2.35168 20.8398C2.22596 20.593 2.18441 20.3452 2.16649 20.1259C2.15 19.924 2.15002 19.6839 2.15004 19.4285L2.15005 17.6626C2.15005 17.6463 2.15001 17.6298 2.14998 17.613C2.14957 17.4201 2.1491 17.1991 2.20116 16.9822C2.24648 16.7935 2.32123 16.613 2.42266 16.4475C2.53918 16.2574 2.69579 16.1014 2.83251 15.9653C2.84438 15.9534 2.8561 15.9418 2.86763 15.9302L7.97814 10.8197C8.10306 10.6948 8.17598 10.6216 8.2276 10.5649C8.25115 10.539 8.26293 10.5244 8.26751 10.5185C8.27131 10.5116 8.27405 10.5064 8.27597 10.5026C8.27648 10.4998 8.27709 10.4962 8.27781 10.4918C8.27753 10.4814 8.27656 10.4518 8.271 10.3942C8.26075 10.2881 8.24152 10.144 8.21143 9.92019C8.17091 9.6188 8.15005 9.31156 8.15005 8.9999ZM15 3.8499C12.1558 3.8499 9.85005 6.15564 9.85005 8.9999C9.85005 9.2356 9.86582 9.46716 9.89628 9.69368L9.89837 9.70928C9.92577 9.913 9.94945 10.0891 9.96313 10.2308C9.97635 10.3678 9.98818 10.5412 9.9632 10.7158C9.92794 10.9623 9.86817 11.1392 9.7467 11.3565C9.61878 11.5854 9.41529 11.7878 9.23157 11.9706C9.21425 11.9879 9.19711 12.0049 9.18022 12.0218L4.06972 17.1323C3.97801 17.224 3.92912 17.2732 3.89424 17.3114C3.88033 17.3267 3.87311 17.3354 3.87007 17.3392C3.86357 17.3505 3.85857 17.3626 3.85519 17.3752C3.85463 17.38 3.85355 17.3913 3.85261 17.4119C3.85025 17.4636 3.85005 17.533 3.85005 17.6626V19.3999C3.85005 19.694 3.85071 19.8634 3.86085 19.9875C3.86499 20.0382 3.86985 20.0663 3.87251 20.0789C3.88472 20.0986 3.90135 20.1152 3.92109 20.1274C3.93369 20.1301 3.96172 20.135 4.01246 20.1391C4.13657 20.1492 4.30599 20.1499 4.60005 20.1499H6.3373C6.467 20.1499 6.53633 20.1497 6.58803 20.1473C6.60864 20.1464 6.61993 20.1453 6.6248 20.1448C6.63837 20.1411 6.65137 20.1356 6.66341 20.1283C6.65324 20.1346 6.65687 20.1346 6.68853 20.1057C6.72676 20.0708 6.77593 20.0219 6.86763 19.9302L11.9781 14.8197C11.995 14.8028 12.0121 14.7857 12.0293 14.7684C12.2121 14.5847 12.4146 14.3812 12.6434 14.2533C12.8608 14.1318 13.0376 14.072 13.2841 14.0367C13.4588 14.0118 13.6322 14.0236 13.7691 14.0368C13.9108 14.0505 14.087 14.0742 14.2907 14.1016L14.3063 14.1037C14.5328 14.1341 14.7643 14.1499 15 14.1499C17.8443 14.1499 20.15 11.8442 20.15 8.9999C20.15 6.15564 17.8443 3.8499 15 3.8499ZM14.15 8.9999C14.15 8.53046 14.5306 8.1499 15 8.1499H15.01C15.4795 8.1499 15.86 8.53046 15.86 8.9999C15.86 9.46934 15.4795 9.8499 15.01 9.8499H15C14.5306 9.8499 14.15 9.46934 14.15 8.9999Z", fill: "#101828" }) });
225
+ };
226
+ var lock = (props) => {
227
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...iconProps3(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.1499 7.9999C6.1499 4.76904 8.76904 2.1499 11.9999 2.1499C15.2308 2.1499 17.8499 4.76904 17.8499 7.9999V9.2727C18.1659 9.33256 18.4634 9.42461 18.7478 9.56953C19.4722 9.93864 20.0612 10.5276 20.4303 11.252C20.665 11.7127 20.761 12.2075 20.8062 12.7603C20.8499 13.2953 20.8499 13.9544 20.8499 14.7641V16.2357C20.8499 17.0454 20.8499 17.7045 20.8062 18.2395C20.761 18.7923 20.665 19.2871 20.4303 19.7478C20.0612 20.4722 19.4722 21.0612 18.7478 21.4303C18.2871 21.665 17.7923 21.761 17.2395 21.8062C16.7045 21.8499 16.0454 21.8499 15.2357 21.8499H8.7641C7.95444 21.8499 7.29532 21.8499 6.76029 21.8062C6.20747 21.761 5.7127 21.665 5.25204 21.4303C4.52762 21.0612 3.93864 20.4722 3.56953 19.7478C3.33481 19.2871 3.23877 18.7923 3.1936 18.2395C3.14989 17.7045 3.14989 17.0454 3.1499 16.2358V14.764C3.14989 13.9544 3.14989 13.2953 3.1936 12.7603C3.23877 12.2075 3.33481 11.7127 3.56953 11.252C3.93864 10.5276 4.52762 9.93864 5.25204 9.56953C5.53645 9.42461 5.83386 9.33256 6.1499 9.2727V7.9999ZM7.8499 9.15282C8.13095 9.14989 8.43507 9.1499 8.76405 9.1499H15.2358C15.5647 9.1499 15.8689 9.14989 16.1499 9.15282V7.9999C16.1499 5.70792 14.2919 3.8499 11.9999 3.8499C9.70792 3.8499 7.8499 5.70792 7.8499 7.9999V9.15282ZM6.89873 10.888C6.45103 10.9245 6.20489 10.992 6.02382 11.0842C5.61927 11.2904 5.29037 11.6193 5.08424 12.0238C4.99198 12.2049 4.92453 12.451 4.88795 12.8987C4.85056 13.3563 4.8499 13.9458 4.8499 14.7999V16.1999C4.8499 17.054 4.85056 17.6435 4.88795 18.1011C4.92453 18.5488 4.99198 18.7949 5.08424 18.976C5.29037 19.3805 5.61928 19.7094 6.02382 19.9156C6.20489 20.0078 6.45103 20.0753 6.89873 20.1119C7.35634 20.1492 7.9458 20.1499 8.7999 20.1499H15.1999C16.054 20.1499 16.6435 20.1492 17.1011 20.1119C17.5488 20.0753 17.7949 20.0078 17.976 19.9156C18.3805 19.7094 18.7094 19.3805 18.9156 18.976C19.0078 18.7949 19.0753 18.5488 19.1119 18.1011C19.1492 17.6435 19.1499 17.054 19.1499 16.1999V14.7999C19.1499 13.9458 19.1492 13.3563 19.1119 12.8987C19.0753 12.451 19.0078 12.2049 18.9156 12.0238C18.7094 11.6193 18.3805 11.2904 17.976 11.0842C17.7949 10.992 17.5488 10.9245 17.1011 10.888C16.6435 10.8506 16.054 10.8499 15.1999 10.8499H8.7999C7.9458 10.8499 7.35634 10.8506 6.89873 10.888ZM11.9999 13.6499C12.4693 13.6499 12.8499 14.0305 12.8499 14.4999V16.4999C12.8499 16.9693 12.4693 17.3499 11.9999 17.3499C11.5305 17.3499 11.1499 16.9693 11.1499 16.4999V14.4999C11.1499 14.0305 11.5305 13.6499 11.9999 13.6499Z", fill: "#101828" }) });
228
+ };
229
+ var lock_unlocked = (props) => {
230
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...iconProps3(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.1499 7.9999C6.1499 4.76904 8.76904 2.1499 11.9999 2.1499C15.2308 2.1499 17.8499 4.76904 17.8499 7.9999V9.2727C18.1659 9.33256 18.4634 9.42461 18.7478 9.56953C19.4722 9.93864 20.0612 10.5276 20.4303 11.252C20.665 11.7127 20.761 12.2075 20.8062 12.7603C20.8499 13.2953 20.8499 13.9544 20.8499 14.7641V16.2357C20.8499 17.0454 20.8499 17.7045 20.8062 18.2395C20.761 18.7923 20.665 19.2871 20.4303 19.7478C20.0612 20.4722 19.4722 21.0612 18.7478 21.4303C18.2871 21.665 17.7923 21.761 17.2395 21.8062C16.7045 21.8499 16.0454 21.8499 15.2357 21.8499H8.7641C7.95444 21.8499 7.29532 21.8499 6.76029 21.8062C6.20747 21.761 5.7127 21.665 5.25204 21.4303C4.52762 21.0612 3.93864 20.4722 3.56953 19.7478C3.33481 19.2871 3.23877 18.7923 3.1936 18.2395C3.14989 17.7045 3.14989 17.0454 3.1499 16.2358V14.764C3.14989 13.9544 3.14989 13.2953 3.1936 12.7603C3.23877 12.2075 3.33481 11.7127 3.56953 11.252C3.93864 10.5276 4.52762 9.93864 5.25204 9.56953C5.53645 9.42461 5.83386 9.33256 6.1499 9.2727V7.9999ZM7.8499 9.15282C8.13095 9.14989 8.43507 9.1499 8.76405 9.1499H15.2358C15.5647 9.1499 15.8689 9.14989 16.1499 9.15282V7.9999C16.1499 5.70792 14.2919 3.8499 11.9999 3.8499C9.70792 3.8499 7.8499 5.70792 7.8499 7.9999V9.15282ZM6.89873 10.888C6.45103 10.9245 6.20489 10.992 6.02382 11.0842C5.61927 11.2904 5.29037 11.6193 5.08424 12.0238C4.99198 12.2049 4.92453 12.451 4.88795 12.8987C4.85056 13.3563 4.8499 13.9458 4.8499 14.7999V16.1999C4.8499 17.054 4.85056 17.6435 4.88795 18.1011C4.92453 18.5488 4.99198 18.7949 5.08424 18.976C5.29037 19.3805 5.61928 19.7094 6.02382 19.9156C6.20489 20.0078 6.45103 20.0753 6.89873 20.1119C7.35634 20.1492 7.9458 20.1499 8.7999 20.1499H15.1999C16.054 20.1499 16.6435 20.1492 17.1011 20.1119C17.5488 20.0753 17.7949 20.0078 17.976 19.9156C18.3805 19.7094 18.7094 19.3805 18.9156 18.976C19.0078 18.7949 19.0753 18.5488 19.1119 18.1011C19.1492 17.6435 19.1499 17.054 19.1499 16.1999V14.7999C19.1499 13.9458 19.1492 13.3563 19.1119 12.8987C19.0753 12.451 19.0078 12.2049 18.9156 12.0238C18.7094 11.6193 18.3805 11.2904 17.976 11.0842C17.7949 10.992 17.5488 10.9245 17.1011 10.888C16.6435 10.8506 16.054 10.8499 15.1999 10.8499H8.7999C7.9458 10.8499 7.35634 10.8506 6.89873 10.888ZM11.9999 13.6499C12.4693 13.6499 12.8499 14.0305 12.8499 14.4999V16.4999C12.8499 16.9693 12.4693 17.3499 11.9999 17.3499C11.5305 17.3499 11.1499 16.9693 11.1499 16.4999V14.4999C11.1499 14.0305 11.5305 13.6499 11.9999 13.6499Z", fill: "#101828" }) });
231
+ };
232
+
233
+ // packages/icons/src/index.tsx
234
+ var import_jsx_runtime5 = require("react/jsx-runtime");
235
+ var iconProps4 = ({ size, ...props }) => ({
132
236
  width: size ?? 20,
133
237
  height: size ?? 20,
134
238
  fill: "none",
@@ -137,18 +241,51 @@ var iconProps = ({ size, ...props }) => ({
137
241
  ...props
138
242
  });
139
243
  function PlusIcon(props) {
140
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) });
244
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...iconProps4(props), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
245
+ "path",
246
+ {
247
+ d: "M12 5v14M5 12h14",
248
+ stroke: "currentColor",
249
+ strokeWidth: "2",
250
+ strokeLinecap: "round"
251
+ }
252
+ ) });
141
253
  }
142
254
  function ChevronDownIcon(props) {
143
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 9 6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
255
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...iconProps4(props), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
256
+ "path",
257
+ {
258
+ d: "m6 9 6 6 6-6",
259
+ stroke: "currentColor",
260
+ strokeWidth: "2",
261
+ strokeLinecap: "round",
262
+ strokeLinejoin: "round"
263
+ }
264
+ ) });
144
265
  }
145
266
  function CloseIcon(props) {
146
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { ...iconProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 6 12 12M18 6 6 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) });
267
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { ...iconProps4(props), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
268
+ "path",
269
+ {
270
+ d: "m6 6 12 12M18 6 6 18",
271
+ stroke: "currentColor",
272
+ strokeWidth: "2",
273
+ strokeLinecap: "round"
274
+ }
275
+ ) });
147
276
  }
148
277
  function SearchIcon(props) {
149
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { ...iconProps(props), children: [
150
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "11", cy: "11", r: "6.5", stroke: "currentColor", strokeWidth: "2" }),
151
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m16 16 4 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
278
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { ...iconProps4(props), children: [
279
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "11", cy: "11", r: "6.5", stroke: "currentColor", strokeWidth: "2" }),
280
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
281
+ "path",
282
+ {
283
+ d: "m16 16 4 4",
284
+ stroke: "currentColor",
285
+ strokeWidth: "2",
286
+ strokeLinecap: "round"
287
+ }
288
+ )
152
289
  ] });
153
290
  }
154
291
 
@@ -157,7 +294,7 @@ var import_react3 = require("react");
157
294
 
158
295
  // packages/pagination/src/index.tsx
159
296
  var import_react2 = require("react");
160
- var import_jsx_runtime3 = require("react/jsx-runtime");
297
+ var import_jsx_runtime6 = require("react/jsx-runtime");
161
298
  var clamp = (value, min, max) => Math.min(Math.max(value, min), max);
162
299
  var range = (start, end) => Array.from({ length: Math.max(0, end - start + 1) }, (_, index) => start + index);
163
300
  function getItems(totalPages, page, siblingCount, boundaryCount) {
@@ -200,9 +337,9 @@ function Pagination({
200
337
  if (page === void 0) setUncontrolledPage(resolvedPage);
201
338
  if (resolvedPage !== currentPage) onPageChange?.(resolvedPage);
202
339
  };
203
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("nav", { className: ["fe-pagination", className].filter(Boolean).join(" "), "aria-label": "Pagination", ...props, children: [
204
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { className: "fe-pagination__button fe-pagination__button--control", hierarchy: "secondary-gray", size: "40", iconOnly: true, icon: "\u2039", "aria-label": previousLabel, disabled: disabled || currentPage === 1, onClick: () => selectPage(currentPage - 1) }),
205
- items.map((item, index) => item === "start-ellipsis" || item === "end-ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fe-pagination__ellipsis", "aria-hidden": "true", children: "\u2026" }, `${item}-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
340
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("nav", { className: ["fe-pagination", className].filter(Boolean).join(" "), "aria-label": "Pagination", ...props, children: [
341
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button, { className: "fe-pagination__button fe-pagination__button--control", hierarchy: "secondary-gray", size: "40", iconOnly: true, icon: "\u2039", "aria-label": previousLabel, disabled: disabled || currentPage === 1, onClick: () => selectPage(currentPage - 1) }),
342
+ items.map((item, index) => item === "start-ellipsis" || item === "end-ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "fe-pagination__ellipsis", "aria-hidden": "true", children: "\u2026" }, `${item}-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
206
343
  Button,
207
344
  {
208
345
  className: "fe-pagination__button",
@@ -216,12 +353,12 @@ function Pagination({
216
353
  },
217
354
  item
218
355
  )),
219
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { className: "fe-pagination__button fe-pagination__button--control", hierarchy: "secondary-gray", size: "40", iconOnly: true, icon: "\u203A", "aria-label": nextLabel, disabled: disabled || currentPage === safeTotalPages, onClick: () => selectPage(currentPage + 1) })
356
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button, { className: "fe-pagination__button fe-pagination__button--control", hierarchy: "secondary-gray", size: "40", iconOnly: true, icon: "\u203A", "aria-label": nextLabel, disabled: disabled || currentPage === safeTotalPages, onClick: () => selectPage(currentPage + 1) })
220
357
  ] });
221
358
  }
222
359
 
223
360
  // packages/table/src/index.tsx
224
- var import_jsx_runtime4 = require("react/jsx-runtime");
361
+ var import_jsx_runtime7 = require("react/jsx-runtime");
225
362
  var TableContext = (0, import_react3.createContext)({ striped: false });
226
363
  var MIN_COLUMN_WIDTH = 96;
227
364
  var MAX_COLUMN_WIDTH = 1200;
@@ -321,14 +458,14 @@ function DataTable({
321
458
  if (nextPage !== currentPage) onPageChange?.(nextPage);
322
459
  };
323
460
  const resolvedPaginationPosition = paginationPosition === "middle-bottom" ? "bottom-center" : paginationPosition;
324
- const paginationControl = shouldPaginate && totalPages > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `fe-table__pagination fe-table__pagination--${resolvedPaginationPosition}`, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Pagination, { page: currentPage, totalPages, onPageChange: changePage }) }) : null;
325
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "fe-table", "data-resizing": isResizing || void 0, children: [
461
+ const paginationControl = shouldPaginate && totalPages > 1 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: `fe-table__pagination fe-table__pagination--${resolvedPaginationPosition}`, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Pagination, { page: currentPage, totalPages, onPageChange: changePage }) }) : null;
462
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "fe-table", "data-resizing": isResizing || void 0, children: [
326
463
  resolvedPaginationPosition === "top-right" && paginationControl,
327
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("table", { className: ["fe-table__table", className].filter(Boolean).join(" "), "data-fe-table": true, "data-striped": striped || void 0, ...props, children: [
328
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("colgroup", { children: sizes2.map((size, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("col", { style: { width: `${size}px` } }, index)) }),
329
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { children: Array.from({ length: columnCount }, (_, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("th", { scope: "col", children: [
330
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "fe-table__header-content", children: headers[columnIndex] ?? `Column ${columnIndex + 1}` }),
331
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
464
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("table", { className: ["fe-table__table", className].filter(Boolean).join(" "), "data-fe-table": true, "data-striped": striped || void 0, ...props, children: [
465
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("colgroup", { children: sizes2.map((size, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("col", { style: { width: `${size}px` } }, index)) }),
466
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tr", { children: Array.from({ length: columnCount }, (_, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("th", { scope: "col", children: [
467
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-table__header-content", children: headers[columnIndex] ?? `Column ${columnIndex + 1}` }),
468
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
332
469
  "span",
333
470
  {
334
471
  className: "fe-table__resize-handle",
@@ -352,7 +489,7 @@ function DataTable({
352
489
  }
353
490
  )
354
491
  ] }, columnIndex)) }) }),
355
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tbody", { children: pagedData.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { children: Array.from({ length: columnCount }, (_, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { children: row[columnIndex] }, columnIndex)) }, shouldPaginate ? (currentPage - 1) * safePageSize + rowIndex : rowIndex)) })
492
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tbody", { children: pagedData.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tr", { children: Array.from({ length: columnCount }, (_, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { children: row[columnIndex] }, columnIndex)) }, shouldPaginate ? (currentPage - 1) * safePageSize + rowIndex : rowIndex)) })
356
493
  ] }),
357
494
  resolvedPaginationPosition !== "top-right" && paginationControl
358
495
  ] });
@@ -370,42 +507,42 @@ function Table({
370
507
  paginationPosition,
371
508
  ...props
372
509
  }) {
373
- if (headers || data) return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DataTable, { headers: headers ?? [], data: data ?? [], striped: striped ?? true, pagination, pageSize, page, defaultPage, onPageChange, paginationPosition, ...props });
374
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TableContext.Provider, { value: { striped: striped ?? false }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("table", { "data-fe-table": true, "data-striped": striped || void 0, ...props, children }) });
510
+ if (headers || data) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DataTable, { headers: headers ?? [], data: data ?? [], striped: striped ?? true, pagination, pageSize, page, defaultPage, onPageChange, paginationPosition, ...props });
511
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableContext.Provider, { value: { striped: striped ?? false }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("table", { "data-fe-table": true, "data-striped": striped || void 0, ...props, children }) });
375
512
  }
376
513
  function TableHead(props) {
377
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("thead", { ...props });
514
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("thead", { ...props });
378
515
  }
379
516
  function TableBody(props) {
380
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tbody", { ...props });
517
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tbody", { ...props });
381
518
  }
382
519
  function TableRow({ children, ...props }) {
383
520
  const { striped } = (0, import_react3.useContext)(TableContext);
384
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { "data-striped": striped || void 0, ...props, children });
521
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tr", { "data-striped": striped || void 0, ...props, children });
385
522
  }
386
523
  function TableCell({ children, ...props }) {
387
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { ...props, children });
524
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { ...props, children });
388
525
  }
389
526
  function TableHeader({ children, ...props }) {
390
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("th", { scope: "col", ...props, children });
527
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("th", { scope: "col", ...props, children });
391
528
  }
392
529
  function TableCaption(props) {
393
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("caption", { ...props });
530
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("caption", { ...props });
394
531
  }
395
532
 
396
533
  // packages/toggle/src/index.tsx
397
534
  var import_react4 = require("react");
398
- var import_jsx_runtime5 = require("react/jsx-runtime");
535
+ var import_jsx_runtime8 = require("react/jsx-runtime");
399
536
  var Toggle = (0, import_react4.forwardRef)(function Toggle2({ color = "#16a34a", label, className, style, id, ...props }, ref) {
400
537
  const classes = ["fe-toggle", className].filter(Boolean).join(" ");
401
538
  const toggleStyle = {
402
539
  "--fe-toggle-color": color,
403
540
  ...style
404
541
  };
405
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: classes, style: toggleStyle, children: [
406
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("input", { ref, id, className: "fe-toggle__input", type: "checkbox", role: "switch", ...props }),
407
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fe-toggle__control", "aria-hidden": "true" }),
408
- label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fe-toggle__label", children: label })
542
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: classes, style: toggleStyle, children: [
543
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { ref, id, className: "fe-toggle__input", type: "checkbox", role: "switch", ...props }),
544
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "fe-toggle__control", "aria-hidden": "true" }),
545
+ label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "fe-toggle__label", children: label })
409
546
  ] });
410
547
  });
411
548
  Toggle.displayName = "Toggle";
@@ -413,7 +550,7 @@ Toggle.displayName = "Toggle";
413
550
  // packages/drawer/src/index.tsx
414
551
  var import_react5 = require("react");
415
552
  var import_react_dom = require("react-dom");
416
- var import_jsx_runtime6 = require("react/jsx-runtime");
553
+ var import_jsx_runtime9 = require("react/jsx-runtime");
417
554
  function Drawer({ open, onClose, title, footer, side = "right", width = 400, fullScreen = false, children, closeOnBackdropClick = true, className, style, ...props }) {
418
555
  (0, import_react5.useEffect)(() => {
419
556
  if (!open) return;
@@ -425,21 +562,48 @@ function Drawer({ open, onClose, title, footer, side = "right", width = 400, ful
425
562
  }, [onClose, open]);
426
563
  if (!open || typeof document === "undefined") return null;
427
564
  const panelStyle = !fullScreen && (side === "left" || side === "right") ? { ...style, width: typeof width === "number" ? `${width}px` : width } : style;
428
- return (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "fe-drawer-backdrop", role: "presentation", onMouseDown: (event) => {
565
+ return (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fe-drawer-backdrop", role: "presentation", onMouseDown: (event) => {
429
566
  if (event.target === event.currentTarget && closeOnBackdropClick) onClose();
430
- }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("aside", { className: ["fe-drawer", `fe-drawer--${side}`, fullScreen && "fe-drawer--full-screen", className].filter(Boolean).join(" "), style: panelStyle, role: "dialog", "aria-modal": "true", "aria-label": typeof title === "string" ? title : "Drawer", ...props, children: [
431
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "fe-drawer__header", children: [
432
- title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { children: title }),
433
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", "aria-label": "Close drawer", onClick: onClose, children: "\xD7" })
567
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("aside", { className: ["fe-drawer", `fe-drawer--${side}`, fullScreen && "fe-drawer--full-screen", className].filter(Boolean).join(" "), style: panelStyle, role: "dialog", "aria-modal": "true", "aria-label": typeof title === "string" ? title : "Drawer", ...props, children: [
568
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("header", { className: "fe-drawer__header", children: [
569
+ title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { children: title }),
570
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", "aria-label": "Close drawer", onClick: onClose, children: "\xD7" })
434
571
  ] }),
435
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "fe-drawer__body", children }),
436
- footer && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("footer", { className: "fe-drawer__footer", children: footer })
572
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fe-drawer__body", children }),
573
+ footer && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("footer", { className: "fe-drawer__footer", children: footer })
437
574
  ] }) }), document.body);
438
575
  }
439
576
 
440
- // packages/form-controls/src/index.tsx
577
+ // packages/form-controls/src/controls/TextInput/text-input.tsx
578
+ var import_react7 = require("react");
579
+
580
+ // packages/tooltip/src/index.tsx
441
581
  var import_react6 = require("react");
442
- var import_jsx_runtime7 = require("react/jsx-runtime");
582
+ var import_jsx_runtime10 = require("react/jsx-runtime");
583
+ function Tooltip({ content, children, placement = "top", disabled, className, ...props }) {
584
+ const [visible, setVisible] = (0, import_react6.useState)(false);
585
+ const id = (0, import_react6.useId)();
586
+ const trigger = (0, import_react6.cloneElement)(children, { "aria-describedby": visible ? id : void 0, onMouseEnter: (event) => {
587
+ children.props.onMouseEnter?.(event);
588
+ setVisible(true);
589
+ }, onMouseLeave: (event) => {
590
+ children.props.onMouseLeave?.(event);
591
+ setVisible(false);
592
+ }, onFocus: (event) => {
593
+ children.props.onFocus?.(event);
594
+ setVisible(true);
595
+ }, onBlur: (event) => {
596
+ children.props.onBlur?.(event);
597
+ setVisible(false);
598
+ } });
599
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: ["fe-tooltip", `fe-tooltip--${placement}`, className].filter(Boolean).join(" "), ...props, children: [
600
+ trigger,
601
+ visible && !disabled && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { id, role: "tooltip", className: "fe-tooltip__content", children: content })
602
+ ] });
603
+ }
604
+
605
+ // packages/form-controls/src/controls/Field/field.tsx
606
+ var import_jsx_runtime11 = require("react/jsx-runtime");
443
607
  function getFieldError(error, errorMessage) {
444
608
  if (errorMessage !== void 0 && errorMessage !== null) return errorMessage;
445
609
  if (typeof error !== "boolean") return error;
@@ -448,161 +612,648 @@ function getFieldError(error, errorMessage) {
448
612
  function getDescribedBy(existing, messageId2) {
449
613
  return [existing, messageId2].filter(Boolean).join(" ") || void 0;
450
614
  }
451
- var TextInput = (0, import_react6.forwardRef)(function TextInput2({ value, defaultValue = "", onChange, onValueChange, label, helperText, error, errorMessage, clearable = false, onClear, clearLabel = "Clear input", className, disabled, readOnly, id, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy, ...props }, ref) {
452
- const generatedId = (0, import_react6.useId)();
453
- const inputId = id ?? `${generatedId}-input`;
454
- const labelId = `${generatedId}-label`;
455
- const messageId2 = `${generatedId}-message`;
456
- const controlled = value !== void 0;
457
- const [internalValue, setInternalValue] = (0, import_react6.useState)(defaultValue);
458
- const currentValue = controlled ? value : internalValue;
459
- const fieldError = getFieldError(error, errorMessage);
460
- const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
461
- const displayedMessage = hasError ? fieldError : helperText;
462
- const describedBy = getDescribedBy(ariaDescribedBy, displayedMessage ? messageId2 : void 0);
463
- const clear = () => {
464
- if (!controlled) setInternalValue("");
465
- onValueChange?.("");
466
- onClear?.();
467
- };
468
- const labelledBy = getDescribedBy(ariaLabelledBy, label ? labelId : void 0);
469
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: ["fe-text-input", hasError && "fe-text-input--error", className].filter(Boolean).join(" "), children: [
470
- label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: labelId, className: "fe-text-input__label", children: label }),
471
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "fe-text-input__control", children: [
472
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { ref, id: inputId, value: currentValue, disabled, readOnly, "aria-invalid": hasError || void 0, "aria-labelledby": labelledBy, "aria-describedby": describedBy, onChange: (event) => {
473
- if (!controlled) setInternalValue(event.target.value);
474
- onValueChange?.(event.target.value);
475
- onChange?.(event);
476
- }, ...props }),
477
- clearable && currentValue && !disabled && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CloseIcon, { size: 14 }), "aria-label": clearLabel, onClick: clear, className: "fe-text-input__clear" })
478
- ] }),
479
- displayedMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: messageId2, className: hasError ? "fe-text-input__error" : "fe-text-input__helper", children: displayedMessage })
615
+ function FieldLabel({
616
+ id,
617
+ label,
618
+ description,
619
+ descriptionDisplay,
620
+ isRequired = false
621
+ }) {
622
+ if (!label) return null;
623
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "fe-field__label", children: [
624
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { id, children: label }),
625
+ isRequired && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "fe-field__required", "aria-hidden": "true", children: "*" }),
626
+ description && descriptionDisplay === "tooltip" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Tooltip, { content: description, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
627
+ "span",
628
+ {
629
+ className: "fe-field__info",
630
+ tabIndex: 0,
631
+ role: "img",
632
+ "aria-label": "More information",
633
+ children: "i"
634
+ }
635
+ ) })
480
636
  ] });
481
- });
637
+ }
638
+ function FieldMessage({
639
+ id,
640
+ error,
641
+ description,
642
+ descriptionDisplay
643
+ }) {
644
+ if (error !== void 0 && error !== false && error !== null)
645
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
646
+ "span",
647
+ {
648
+ id,
649
+ className: "fe-field__message fe-field__message--error",
650
+ role: "alert",
651
+ children: error
652
+ }
653
+ );
654
+ if (description && descriptionDisplay === "inline")
655
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { id, className: "fe-field__message", children: description });
656
+ return null;
657
+ }
658
+
659
+ // packages/form-controls/src/controls/TextInput/text-input.tsx
660
+ var import_jsx_runtime12 = require("react/jsx-runtime");
661
+ var TextInput = (0, import_react7.forwardRef)(
662
+ function TextInput2({
663
+ value,
664
+ defaultValue = "",
665
+ onChange,
666
+ onValueChange,
667
+ label,
668
+ description,
669
+ descriptionDisplay = "inline",
670
+ helperText,
671
+ error,
672
+ errorMessage,
673
+ clearable = false,
674
+ onClear,
675
+ clearLabel = "Clear input",
676
+ className,
677
+ disabled,
678
+ readOnly,
679
+ id,
680
+ prefix,
681
+ suffix,
682
+ Prefix,
683
+ Suffix,
684
+ isRequired = false,
685
+ placeholder,
686
+ required,
687
+ "aria-describedby": ariaDescribedBy,
688
+ "aria-labelledby": ariaLabelledBy,
689
+ ...props
690
+ }, ref) {
691
+ const generatedId = (0, import_react7.useId)();
692
+ const inputId = id ?? generatedId + "-input";
693
+ const labelId = generatedId + "-label";
694
+ const messageId2 = generatedId + "-message";
695
+ const controlled = value !== void 0;
696
+ const [internalValue, setInternalValue] = (0, import_react7.useState)(defaultValue);
697
+ const currentValue = controlled ? value : internalValue;
698
+ const fieldError = getFieldError(error, errorMessage);
699
+ const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
700
+ const resolvedDescription = description ?? helperText;
701
+ const hasMessage = hasError || resolvedDescription && descriptionDisplay === "inline";
702
+ const describedBy = getDescribedBy(
703
+ ariaDescribedBy,
704
+ hasMessage ? messageId2 : void 0
705
+ );
706
+ const resolvedPrefix = prefix ?? Prefix;
707
+ const resolvedSuffix = suffix ?? Suffix;
708
+ const labelledBy = getDescribedBy(
709
+ ariaLabelledBy,
710
+ label ? labelId : void 0
711
+ );
712
+ const clear = () => {
713
+ if (!controlled) setInternalValue("");
714
+ onValueChange?.("");
715
+ onClear?.();
716
+ };
717
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
718
+ "div",
719
+ {
720
+ className: [
721
+ "fe-text-input",
722
+ hasError && "fe-text-input--error",
723
+ className
724
+ ].filter(Boolean).join(" "),
725
+ children: [
726
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
727
+ FieldLabel,
728
+ {
729
+ id: labelId,
730
+ label,
731
+ description: resolvedDescription,
732
+ descriptionDisplay,
733
+ isRequired
734
+ }
735
+ ),
736
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "fe-text-input__control", children: [
737
+ resolvedPrefix && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "fe-text-input__prefix", children: resolvedPrefix }),
738
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "fe-text-input__input-wrap", children: [
739
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
740
+ "input",
741
+ {
742
+ ref,
743
+ id: inputId,
744
+ value: currentValue,
745
+ placeholder,
746
+ required: isRequired || required,
747
+ disabled,
748
+ readOnly,
749
+ "aria-invalid": hasError || void 0,
750
+ "aria-required": isRequired || void 0,
751
+ "aria-labelledby": labelledBy,
752
+ "aria-describedby": describedBy,
753
+ onChange: (event) => {
754
+ if (!controlled) setInternalValue(event.target.value);
755
+ onValueChange?.(event.target.value);
756
+ onChange?.(event);
757
+ },
758
+ ...props
759
+ }
760
+ ),
761
+ isRequired && placeholder && !currentValue && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "fe-text-input__placeholder", "aria-hidden": "true", children: [
762
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: placeholder }),
763
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "fe-field__required", children: "*" })
764
+ ] })
765
+ ] }),
766
+ resolvedSuffix && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "fe-text-input__suffix", children: resolvedSuffix }),
767
+ clearable && currentValue && !disabled && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
768
+ Button,
769
+ {
770
+ hierarchy: "tertiary-gray",
771
+ size: "24",
772
+ iconOnly: true,
773
+ icon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CloseIcon, { size: 14 }),
774
+ "aria-label": clearLabel,
775
+ onClick: clear,
776
+ className: "fe-text-input__clear"
777
+ }
778
+ )
779
+ ] }),
780
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
781
+ FieldMessage,
782
+ {
783
+ id: messageId2,
784
+ error: fieldError,
785
+ description: resolvedDescription,
786
+ descriptionDisplay
787
+ }
788
+ )
789
+ ]
790
+ }
791
+ );
792
+ }
793
+ );
482
794
  TextInput.displayName = "TextInput";
483
- var TextArea = (0, import_react6.forwardRef)(function TextArea2({ value, defaultValue = "", onChange, onValueChange, label, helperText, error, errorMessage, clearable = false, onClear, clearLabel = "Clear text area", className, disabled, readOnly, id, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy, ...props }, ref) {
484
- const generatedId = (0, import_react6.useId)();
485
- const inputId = id ?? `${generatedId}-input`;
486
- const labelId = `${generatedId}-label`;
487
- const messageId2 = `${generatedId}-message`;
488
- const controlled = value !== void 0;
489
- const [internalValue, setInternalValue] = (0, import_react6.useState)(defaultValue);
490
- const currentValue = controlled ? value : internalValue;
491
- const fieldError = getFieldError(error, errorMessage);
492
- const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
493
- const displayedMessage = hasError ? fieldError : helperText;
494
- const describedBy = getDescribedBy(ariaDescribedBy, displayedMessage ? messageId2 : void 0);
495
- const clear = () => {
496
- if (!controlled) setInternalValue("");
497
- onValueChange?.("");
498
- onClear?.();
499
- };
500
- const labelledBy = getDescribedBy(ariaLabelledBy, label ? labelId : void 0);
501
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: ["fe-text-area", hasError && "fe-text-area--error", className].filter(Boolean).join(" "), children: [
502
- label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: labelId, className: "fe-text-area__label", children: label }),
503
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "fe-text-area__control", children: [
504
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("textarea", { ref, id: inputId, value: currentValue, disabled, readOnly, "aria-invalid": hasError || void 0, "aria-labelledby": labelledBy, "aria-describedby": describedBy, onChange: (event) => {
505
- if (!controlled) setInternalValue(event.target.value);
506
- onValueChange?.(event.target.value);
507
- onChange?.(event);
508
- }, ...props }),
509
- clearable && currentValue && !disabled && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CloseIcon, { size: 14 }), "aria-label": clearLabel, onClick: clear, className: "fe-text-area__clear" })
510
- ] }),
511
- displayedMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: messageId2, className: hasError ? "fe-text-area__error" : "fe-text-area__helper", children: displayedMessage })
512
- ] });
513
- });
795
+
796
+ // packages/form-controls/src/controls/TextArea/text-area.tsx
797
+ var import_react8 = require("react");
798
+ var import_jsx_runtime13 = require("react/jsx-runtime");
799
+ var TextArea = (0, import_react8.forwardRef)(
800
+ function TextArea2({
801
+ value,
802
+ defaultValue = "",
803
+ onChange,
804
+ onValueChange,
805
+ label,
806
+ description,
807
+ descriptionDisplay = "inline",
808
+ helperText,
809
+ error,
810
+ errorMessage,
811
+ clearable = false,
812
+ onClear,
813
+ clearLabel = "Clear text area",
814
+ className,
815
+ disabled,
816
+ readOnly,
817
+ id,
818
+ isRequired = false,
819
+ placeholder,
820
+ required,
821
+ "aria-describedby": ariaDescribedBy,
822
+ "aria-labelledby": ariaLabelledBy,
823
+ ...props
824
+ }, ref) {
825
+ const generatedId = (0, import_react8.useId)();
826
+ const inputId = id ?? generatedId + "-input";
827
+ const labelId = generatedId + "-label";
828
+ const messageId2 = generatedId + "-message";
829
+ const controlled = value !== void 0;
830
+ const [internalValue, setInternalValue] = (0, import_react8.useState)(defaultValue);
831
+ const currentValue = controlled ? value : internalValue;
832
+ const fieldError = getFieldError(error, errorMessage);
833
+ const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
834
+ const resolvedDescription = description ?? helperText;
835
+ const hasMessage = hasError || resolvedDescription && descriptionDisplay === "inline";
836
+ const describedBy = getDescribedBy(
837
+ ariaDescribedBy,
838
+ hasMessage ? messageId2 : void 0
839
+ );
840
+ const labelledBy = getDescribedBy(
841
+ ariaLabelledBy,
842
+ label ? labelId : void 0
843
+ );
844
+ const clear = () => {
845
+ if (!controlled) setInternalValue("");
846
+ onValueChange?.("");
847
+ onClear?.();
848
+ };
849
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
850
+ "div",
851
+ {
852
+ className: [
853
+ "fe-text-area",
854
+ hasError && "fe-text-area--error",
855
+ className
856
+ ].filter(Boolean).join(" "),
857
+ children: [
858
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
859
+ FieldLabel,
860
+ {
861
+ id: labelId,
862
+ label,
863
+ description: resolvedDescription,
864
+ descriptionDisplay,
865
+ isRequired
866
+ }
867
+ ),
868
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "fe-text-area__control", children: [
869
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
870
+ "textarea",
871
+ {
872
+ ref,
873
+ id: inputId,
874
+ value: currentValue,
875
+ placeholder,
876
+ required: isRequired || required,
877
+ disabled,
878
+ readOnly,
879
+ "aria-invalid": hasError || void 0,
880
+ "aria-required": isRequired || void 0,
881
+ "aria-labelledby": labelledBy,
882
+ "aria-describedby": describedBy,
883
+ onChange: (event) => {
884
+ if (!controlled) setInternalValue(event.target.value);
885
+ onValueChange?.(event.target.value);
886
+ onChange?.(event);
887
+ },
888
+ ...props
889
+ }
890
+ ),
891
+ isRequired && placeholder && !currentValue && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "fe-text-area__placeholder", "aria-hidden": "true", children: [
892
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: placeholder }),
893
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "fe-field__required", children: "*" })
894
+ ] }),
895
+ clearable && currentValue && !disabled && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
896
+ Button,
897
+ {
898
+ hierarchy: "tertiary-gray",
899
+ size: "24",
900
+ iconOnly: true,
901
+ icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CloseIcon, { size: 14 }),
902
+ "aria-label": clearLabel,
903
+ onClick: clear,
904
+ className: "fe-text-area__clear"
905
+ }
906
+ )
907
+ ] }),
908
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
909
+ FieldMessage,
910
+ {
911
+ id: messageId2,
912
+ error: fieldError,
913
+ description: resolvedDescription,
914
+ descriptionDisplay
915
+ }
916
+ )
917
+ ]
918
+ }
919
+ );
920
+ }
921
+ );
514
922
  TextArea.displayName = "TextArea";
515
- var Selection = (0, import_react6.forwardRef)(function Selection2({ className, label, helperText, error, options, placeholder = "Select an option", size = "medium", id, value, defaultValue, onChange, multiple = false, searchable = false, tag = false, clearable = false, disabled = false, name, onKeyDown, ...props }, ref) {
516
- const generatedId = (0, import_react6.useId)();
517
- const listboxId = id ?? generatedId;
518
- const isControlled = value !== void 0;
519
- const [internalValue, setInternalValue] = (0, import_react6.useState)(defaultValue ?? (multiple ? [] : ""));
520
- const selectedValue = isControlled ? value : internalValue;
521
- const selectedValues = Array.isArray(selectedValue) ? selectedValue : selectedValue === "" || selectedValue === null || selectedValue === void 0 ? [] : [selectedValue];
522
- const selectedOptions = options.filter((option) => selectedValues.some((item) => String(item) === String(option.value)));
523
- const [open, setOpen] = (0, import_react6.useState)(false);
524
- const [query, setQuery] = (0, import_react6.useState)("");
525
- const [activeIndex, setActiveIndex] = (0, import_react6.useState)(0);
526
- const rootRef = (0, import_react6.useRef)(null);
527
- (0, import_react6.useEffect)(() => {
528
- const close = (event) => {
529
- if (!rootRef.current?.contains(event.target)) setOpen(false);
923
+
924
+ // packages/form-controls/src/controls/Selection/selection.tsx
925
+ var import_react9 = require("react");
926
+ var import_react_dom2 = require("react-dom");
927
+ var import_jsx_runtime14 = require("react/jsx-runtime");
928
+ var Selection = (0, import_react9.forwardRef)(
929
+ function Selection2({
930
+ className,
931
+ label,
932
+ isRequired = false,
933
+ description,
934
+ descriptionDisplay = "inline",
935
+ helperText,
936
+ error,
937
+ errorMessage,
938
+ options,
939
+ placeholder = "Select an option",
940
+ size = "medium",
941
+ id,
942
+ value,
943
+ defaultValue,
944
+ onChange,
945
+ multiple = false,
946
+ searchable = false,
947
+ tag = false,
948
+ clearable = false,
949
+ disabled = false,
950
+ name,
951
+ onKeyDown,
952
+ "aria-label": ariaLabel,
953
+ "aria-describedby": ariaDescribedBy,
954
+ "aria-labelledby": ariaLabelledBy,
955
+ ...props
956
+ }, ref) {
957
+ const generatedId = (0, import_react9.useId)();
958
+ const triggerId = id ?? generatedId + "-trigger";
959
+ const listboxId = triggerId + "-listbox";
960
+ const labelId = generatedId + "-label";
961
+ const messageId2 = generatedId + "-message";
962
+ const fieldError = getFieldError(error, errorMessage);
963
+ const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
964
+ const resolvedDescription = description ?? helperText;
965
+ const hasMessage = hasError || resolvedDescription && descriptionDisplay === "inline";
966
+ const describedBy = getDescribedBy(
967
+ ariaDescribedBy,
968
+ hasMessage ? messageId2 : void 0
969
+ );
970
+ const labelledBy = getDescribedBy(
971
+ ariaLabelledBy,
972
+ label ? labelId : void 0
973
+ );
974
+ const isControlled = value !== void 0;
975
+ const [internalValue, setInternalValue] = (0, import_react9.useState)(
976
+ defaultValue ?? (multiple ? [] : "")
977
+ );
978
+ const selectedValue = isControlled ? value : internalValue;
979
+ const selectedValues = Array.isArray(selectedValue) ? selectedValue : selectedValue === "" || selectedValue === null || selectedValue === void 0 ? [] : [selectedValue];
980
+ const selectedOptions = options.filter(
981
+ (option) => selectedValues.some((item) => String(item) === String(option.value))
982
+ );
983
+ const [open, setOpen] = (0, import_react9.useState)(false);
984
+ const [query, setQuery] = (0, import_react9.useState)("");
985
+ const [activeIndex, setActiveIndex] = (0, import_react9.useState)(0);
986
+ const rootRef = (0, import_react9.useRef)(null);
987
+ const menuRef = (0, import_react9.useRef)(null);
988
+ const [menuPosition, setMenuPosition] = (0, import_react9.useState)(null);
989
+ (0, import_react9.useEffect)(() => {
990
+ const close = (event) => {
991
+ const target = event.target;
992
+ if (!rootRef.current?.contains(target) && !menuRef.current?.contains(target))
993
+ setOpen(false);
994
+ };
995
+ document.addEventListener("mousedown", close);
996
+ return () => document.removeEventListener("mousedown", close);
997
+ }, []);
998
+ (0, import_react9.useLayoutEffect)(() => {
999
+ if (!open) return;
1000
+ const updateMenuPosition = () => {
1001
+ const rect = rootRef.current?.getBoundingClientRect();
1002
+ if (rect)
1003
+ setMenuPosition({
1004
+ top: rect.bottom + 7,
1005
+ left: rect.left,
1006
+ width: rect.width
1007
+ });
1008
+ };
1009
+ updateMenuPosition();
1010
+ window.addEventListener("resize", updateMenuPosition);
1011
+ document.addEventListener("scroll", updateMenuPosition, true);
1012
+ return () => {
1013
+ window.removeEventListener("resize", updateMenuPosition);
1014
+ document.removeEventListener("scroll", updateMenuPosition, true);
1015
+ };
1016
+ }, [open]);
1017
+ const filteredOptions = options.filter(
1018
+ (option) => !query || (option.searchText ?? (typeof option.label === "string" ? option.label : String(option.value))).toLowerCase().includes(query.toLowerCase())
1019
+ );
1020
+ const commit = (next) => {
1021
+ if (!isControlled) setInternalValue(next);
1022
+ const selected = options.filter(
1023
+ (option) => (Array.isArray(next) ? next : [next]).some(
1024
+ (item) => String(item) === String(option.value)
1025
+ )
1026
+ );
1027
+ onChange?.(next, multiple ? selected : selected[0]);
530
1028
  };
531
- document.addEventListener("mousedown", close);
532
- return () => document.removeEventListener("mousedown", close);
533
- }, []);
534
- const filteredOptions = options.filter((option) => !query || (option.searchText ?? (typeof option.label === "string" ? option.label : String(option.value))).toLowerCase().includes(query.toLowerCase()));
535
- const commit = (next) => {
536
- if (!isControlled) setInternalValue(next);
537
- const selected = options.filter((option) => (Array.isArray(next) ? next : [next]).some((item) => String(item) === String(option.value)));
538
- onChange?.(next, multiple ? selected : selected[0]);
539
- };
540
- const choose = (option) => {
541
- if (option.disabled) return;
542
- const isSelected = selectedValues.some((item) => String(item) === String(option.value));
543
- if (multiple) commit(isSelected ? selectedValues.filter((item) => String(item) !== String(option.value)) : [...selectedValues, option.value]);
544
- else {
545
- commit(option.value);
546
- setOpen(false);
1029
+ const choose = (option) => {
1030
+ if (option.disabled) return;
1031
+ const isSelected = selectedValues.some(
1032
+ (item) => String(item) === String(option.value)
1033
+ );
1034
+ if (multiple)
1035
+ commit(
1036
+ isSelected ? selectedValues.filter(
1037
+ (item) => String(item) !== String(option.value)
1038
+ ) : [...selectedValues, option.value]
1039
+ );
1040
+ else {
1041
+ commit(option.value);
1042
+ setOpen(false);
1043
+ setQuery("");
1044
+ }
1045
+ };
1046
+ const clear = () => {
1047
+ commit(multiple ? [] : "");
547
1048
  setQuery("");
548
- }
549
- };
550
- const clear = () => {
551
- commit(multiple ? [] : "");
552
- setQuery("");
553
- };
554
- const displayLabel = selectedOptions.length ? selectedOptions.map((option) => option.label) : null;
555
- const onTriggerKeyDown = (event) => {
556
- onKeyDown?.(event);
557
- if (disabled) return;
558
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
559
- event.preventDefault();
560
- setOpen(true);
561
- setActiveIndex((current) => Math.max(0, Math.min(filteredOptions.length - 1, current + (event.key === "ArrowDown" ? 1 : -1))));
562
- }
563
- if (event.key === "Enter" || event.key === " ") {
564
- event.preventDefault();
565
- if (!open) setOpen(true);
566
- else if (filteredOptions[activeIndex]) choose(filteredOptions[activeIndex]);
567
- }
568
- if (event.key === "Escape") setOpen(false);
569
- };
570
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref, className: ["fe-selection", `fe-selection--${size}`, open && "fe-selection--open", clearable && selectedOptions.length > 0 && "fe-selection--clearable", error && "fe-selection--error", disabled && "fe-selection--disabled", className].filter(Boolean).join(" "), ...props, children: [
571
- label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-selection__label", children: label }),
572
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref: rootRef, className: "fe-selection__control", children: [
573
- name && selectedValues.map((item) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "hidden", name: multiple ? `${name}[]` : name, value: item }, String(item))),
574
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "fe-selection__trigger", disabled, "aria-invalid": error || void 0, "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": listboxId, onClick: () => setOpen((current) => !current), onKeyDown: onTriggerKeyDown, children: [
575
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: ["fe-selection__value", !selectedOptions.length && "is-placeholder", tag && selectedOptions.length > 1 && "is-tags"].filter(Boolean).join(" "), children: displayLabel ? tag && multiple ? selectedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "fe-selection__tag", children: [
576
- option.label,
577
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": "true", children: "\xD7" })
578
- ] }, String(option.value))) : displayLabel.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
579
- item,
580
- index < displayLabel.length - 1 ? ", " : ""
581
- ] }, index)) : placeholder }),
582
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-selection__actions", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-selection__chevron", "aria-hidden": "true" }) })
583
- ] }),
584
- clearable && selectedOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "fe-selection__clear", "aria-label": "Clear selection", onClick: clear }),
585
- open && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id: listboxId, className: "fe-selection__menu", role: "listbox", "aria-multiselectable": multiple || void 0, children: [
586
- searchable && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "fe-selection__search", children: [
587
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": "true", children: "\u2315" }),
588
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { autoFocus: true, value: query, onChange: (event) => {
589
- setQuery(event.target.value);
590
- setActiveIndex(0);
591
- }, placeholder: "Search\u2026", "aria-label": "Search options" })
592
- ] }),
593
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "fe-selection__options", children: filteredOptions.length ? filteredOptions.map((option, index) => {
594
- const isSelected = selectedValues.some((item) => String(item) === String(option.value));
595
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: [isSelected && "is-selected", index === activeIndex && "is-active"].filter(Boolean).join(" "), role: "option", "aria-selected": isSelected, disabled: option.disabled, onMouseMove: () => setActiveIndex(index), onClick: () => choose(option), children: [
596
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: option.label }),
597
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-selection__check", "aria-hidden": "true", children: "\u2713" })
598
- ] }, String(option.value));
599
- }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "fe-selection__empty", children: "No matching options" }) })
600
- ] })
601
- ] }),
602
- helperText && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-selection__helper", children: helperText })
603
- ] });
604
- });
1049
+ };
1050
+ const displayLabel = selectedOptions.length ? selectedOptions.map((option) => option.label) : null;
1051
+ const onTriggerKeyDown = (event) => {
1052
+ onKeyDown?.(event);
1053
+ if (disabled) return;
1054
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
1055
+ event.preventDefault();
1056
+ setOpen(true);
1057
+ setActiveIndex(
1058
+ (current) => Math.max(
1059
+ 0,
1060
+ Math.min(
1061
+ filteredOptions.length - 1,
1062
+ current + (event.key === "ArrowDown" ? 1 : -1)
1063
+ )
1064
+ )
1065
+ );
1066
+ }
1067
+ if (event.key === "Enter" || event.key === " ") {
1068
+ event.preventDefault();
1069
+ if (!open) setOpen(true);
1070
+ else if (filteredOptions[activeIndex])
1071
+ choose(filteredOptions[activeIndex]);
1072
+ }
1073
+ if (event.key === "Escape") setOpen(false);
1074
+ };
1075
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1076
+ "div",
1077
+ {
1078
+ ref,
1079
+ className: [
1080
+ "fe-selection",
1081
+ "fe-selection--" + size,
1082
+ open && "fe-selection--open",
1083
+ clearable && selectedOptions.length > 0 && "fe-selection--clearable",
1084
+ hasError && "fe-selection--error",
1085
+ disabled && "fe-selection--disabled",
1086
+ className
1087
+ ].filter(Boolean).join(" "),
1088
+ ...props,
1089
+ children: [
1090
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1091
+ FieldLabel,
1092
+ {
1093
+ id: labelId,
1094
+ label,
1095
+ description: resolvedDescription,
1096
+ descriptionDisplay,
1097
+ isRequired
1098
+ }
1099
+ ),
1100
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { ref: rootRef, className: "fe-selection__control", children: [
1101
+ name && selectedValues.map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1102
+ "input",
1103
+ {
1104
+ type: "hidden",
1105
+ name: multiple ? name + "[]" : name,
1106
+ value: item
1107
+ },
1108
+ String(item)
1109
+ )),
1110
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1111
+ "button",
1112
+ {
1113
+ id: triggerId,
1114
+ type: "button",
1115
+ className: "fe-selection__trigger",
1116
+ disabled,
1117
+ "aria-label": ariaLabel,
1118
+ "aria-invalid": hasError || void 0,
1119
+ "aria-required": isRequired || void 0,
1120
+ "aria-labelledby": labelledBy,
1121
+ "aria-describedby": describedBy,
1122
+ "aria-haspopup": "listbox",
1123
+ "aria-expanded": open,
1124
+ "aria-controls": listboxId,
1125
+ onClick: () => setOpen((current) => !current),
1126
+ onKeyDown: onTriggerKeyDown,
1127
+ children: [
1128
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1129
+ "span",
1130
+ {
1131
+ className: [
1132
+ "fe-selection__value",
1133
+ !selectedOptions.length && "is-placeholder",
1134
+ tag && selectedOptions.length > 1 && "is-tags"
1135
+ ].filter(Boolean).join(" "),
1136
+ children: displayLabel ? tag && multiple ? selectedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1137
+ "span",
1138
+ {
1139
+ className: "fe-selection__tag",
1140
+ children: [
1141
+ option.label,
1142
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": "true", children: "\xD7" })
1143
+ ]
1144
+ },
1145
+ String(option.value)
1146
+ )) : displayLabel.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
1147
+ item,
1148
+ index < displayLabel.length - 1 ? ", " : ""
1149
+ ] }, index)) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1150
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: placeholder }),
1151
+ isRequired && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fe-field__required", "aria-hidden": "true", children: "*" })
1152
+ ] })
1153
+ }
1154
+ ),
1155
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fe-selection__actions", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fe-selection__chevron", "aria-hidden": "true" }) })
1156
+ ]
1157
+ }
1158
+ ),
1159
+ clearable && selectedOptions.length > 0 && !disabled && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1160
+ "button",
1161
+ {
1162
+ type: "button",
1163
+ className: "fe-selection__clear",
1164
+ "aria-label": "Clear selection",
1165
+ onClick: clear
1166
+ }
1167
+ ),
1168
+ open && menuPosition && (0, import_react_dom2.createPortal)(
1169
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1170
+ "div",
1171
+ {
1172
+ ref: menuRef,
1173
+ id: listboxId,
1174
+ className: "fe-selection__menu",
1175
+ style: {
1176
+ position: "fixed",
1177
+ top: menuPosition.top,
1178
+ left: menuPosition.left,
1179
+ width: menuPosition.width
1180
+ },
1181
+ role: "listbox",
1182
+ "aria-multiselectable": multiple || void 0,
1183
+ children: [
1184
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fe-selection__search", children: [
1185
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": "true", children: "\u2315" }),
1186
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1187
+ "input",
1188
+ {
1189
+ autoFocus: true,
1190
+ value: query,
1191
+ onChange: (event) => {
1192
+ setQuery(event.target.value);
1193
+ setActiveIndex(0);
1194
+ },
1195
+ placeholder: "Search\u2026",
1196
+ "aria-label": "Search options"
1197
+ }
1198
+ )
1199
+ ] }),
1200
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fe-selection__options", children: filteredOptions.length ? filteredOptions.map((option, index) => {
1201
+ const isSelected = selectedValues.some(
1202
+ (item) => String(item) === String(option.value)
1203
+ );
1204
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1205
+ "button",
1206
+ {
1207
+ type: "button",
1208
+ className: [
1209
+ isSelected && "is-selected",
1210
+ index === activeIndex && "is-active"
1211
+ ].filter(Boolean).join(" "),
1212
+ role: "option",
1213
+ "aria-selected": isSelected,
1214
+ disabled: option.disabled,
1215
+ onMouseMove: () => setActiveIndex(index),
1216
+ onClick: () => choose(option),
1217
+ children: [
1218
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: option.label }),
1219
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1220
+ "span",
1221
+ {
1222
+ className: "fe-selection__check",
1223
+ "aria-hidden": "true",
1224
+ children: "\u2713"
1225
+ }
1226
+ )
1227
+ ]
1228
+ },
1229
+ String(option.value)
1230
+ );
1231
+ }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "fe-selection__empty", children: "No matching options" }) })
1232
+ ]
1233
+ }
1234
+ ),
1235
+ document.body
1236
+ )
1237
+ ] }),
1238
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1239
+ FieldMessage,
1240
+ {
1241
+ id: messageId2,
1242
+ error: fieldError,
1243
+ description: resolvedDescription,
1244
+ descriptionDisplay
1245
+ }
1246
+ )
1247
+ ]
1248
+ }
1249
+ );
1250
+ }
1251
+ );
605
1252
  Selection.displayName = "Selection";
1253
+
1254
+ // packages/form-controls/src/controls/NumberInput/number-input.tsx
1255
+ var import_react10 = require("react");
1256
+ var import_jsx_runtime15 = require("react/jsx-runtime");
606
1257
  function formatNumber(value, decimals = 2, thousandSeparator = ",", decimalSeparator = ".") {
607
1258
  return new Intl.NumberFormat("en-US", {
608
1259
  minimumFractionDigits: 0,
@@ -611,7 +1262,7 @@ function formatNumber(value, decimals = 2, thousandSeparator = ",", decimalSepar
611
1262
  }).format(value).replace(/,/g, thousandSeparator).replace(/\./g, decimalSeparator);
612
1263
  }
613
1264
  function escapeRegExp(value) {
614
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1265
+ return value.replace(/[.*+?^$\x7B\x7D()|[\]\\]/g, "\\$&");
615
1266
  }
616
1267
  function groupInteger(value, separator) {
617
1268
  return value.replace(/\B(?=(\d{3})+(?!\d))/g, separator);
@@ -620,7 +1271,10 @@ function normalizeNumberInput(raw, options) {
620
1271
  const { allowDecimal, decimalSeparator, thousandSeparator, min, max } = options;
621
1272
  const decimals = Math.max(0, options.decimals);
622
1273
  const negative = raw.trimStart().startsWith("-") && (min === void 0 || min < 0);
623
- const decimalExpression = new RegExp(`[^0-9${allowDecimal ? escapeRegExp(decimalSeparator) : ""}]`, "g");
1274
+ const decimalExpression = new RegExp(
1275
+ "[^0-9" + (allowDecimal ? escapeRegExp(decimalSeparator) : "") + "]",
1276
+ "g"
1277
+ );
624
1278
  const cleaned = raw.replace(decimalExpression, "");
625
1279
  const decimalIndex = allowDecimal ? cleaned.indexOf(decimalSeparator) : -1;
626
1280
  const hasDecimal = decimalIndex >= 0;
@@ -628,64 +1282,227 @@ function normalizeNumberInput(raw, options) {
628
1282
  const rawFraction = hasDecimal ? cleaned.slice(decimalIndex + decimalSeparator.length).replace(new RegExp(escapeRegExp(decimalSeparator), "g"), "") : "";
629
1283
  const integer = rawInteger.replace(/^0+(?=\d)/, "") || (rawInteger ? "0" : "");
630
1284
  const fraction = rawFraction.slice(0, decimals);
631
- if (!integer && !fraction) return { display: negative ? "-" : "", value: null };
632
- const numericValue = Number(`${negative ? "-" : ""}${integer || "0"}${hasDecimal ? `.${fraction || "0"}` : ""}`);
1285
+ if (!integer && !fraction)
1286
+ return { display: negative ? "-" : "", value: null };
1287
+ const numericValue = Number(
1288
+ (negative ? "-" : "") + (integer || "0") + (hasDecimal ? "." + (fraction || "0") : "")
1289
+ );
633
1290
  if (!Number.isFinite(numericValue)) return { display: "", value: null };
634
1291
  const lowerBound = min === void 0 ? numericValue : Math.max(numericValue, min);
635
1292
  const value = max === void 0 ? lowerBound : Math.min(lowerBound, max);
636
- if (value !== numericValue) return { display: formatNumber(value, decimals, thousandSeparator, decimalSeparator), value };
637
- return { display: `${negative ? "-" : ""}${groupInteger(integer || "0", thousandSeparator)}${hasDecimal ? `${decimalSeparator}${fraction}` : ""}`, value };
638
- }
639
- var NumberInput = (0, import_react6.forwardRef)(function NumberInput2({ value, defaultValue = null, onValueChange, allowDecimal = true, decimals = 2, min, max, decimalSeparator = ".", thousandSeparator = ",", label, helperText, error, errorMessage, className, onBlur, onFocus, "aria-describedby": ariaDescribedBy, ...props }, ref) {
640
- const generatedId = (0, import_react6.useId)();
641
- const messageId2 = `${generatedId}-message`;
642
- const isControlled = value !== void 0;
643
- const [internalValue, setInternalValue] = (0, import_react6.useState)(defaultValue);
644
- const [focused, setFocused] = (0, import_react6.useState)(false);
645
- const actualValue = isControlled ? value ?? null : internalValue;
646
- const [text, setText] = (0, import_react6.useState)(actualValue === null ? "" : formatNumber(actualValue, decimals, thousandSeparator, decimalSeparator));
647
- const fieldError = getFieldError(error, errorMessage);
648
- const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
649
- const displayedMessage = hasError ? fieldError : helperText;
650
- const describedBy = getDescribedBy(ariaDescribedBy, displayedMessage ? messageId2 : void 0);
651
- (0, import_react6.useEffect)(() => {
652
- if (!focused) setText(actualValue === null ? "" : formatNumber(actualValue, decimals, thousandSeparator, decimalSeparator));
653
- }, [actualValue, decimalSeparator, decimals, focused, thousandSeparator]);
654
- const updateValue = (nextText) => {
655
- const next = normalizeNumberInput(nextText, { allowDecimal, decimals, decimalSeparator, thousandSeparator, min, max });
656
- setText(next.display);
657
- const nextValue = next.value;
658
- if (!isControlled) setInternalValue(nextValue);
659
- onValueChange?.(nextValue);
1293
+ if (value !== numericValue)
1294
+ return {
1295
+ display: formatNumber(
1296
+ value,
1297
+ decimals,
1298
+ thousandSeparator,
1299
+ decimalSeparator
1300
+ ),
1301
+ value
1302
+ };
1303
+ return {
1304
+ display: (negative ? "-" : "") + groupInteger(integer || "0", thousandSeparator) + (hasDecimal ? decimalSeparator + fraction : ""),
1305
+ value
660
1306
  };
661
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: ["fe-number-input", hasError && "fe-number-input--error", className].filter(Boolean).join(" "), children: [
662
- label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-number-input__label", children: label }),
663
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { ref, inputMode: allowDecimal ? "decimal" : "numeric", value: text, onFocus: (event) => {
664
- setFocused(true);
665
- onFocus?.(event);
666
- }, onChange: (event) => updateValue(event.target.value), onBlur: (event) => {
667
- setFocused(false);
668
- onBlur?.(event);
669
- }, ...props, "aria-invalid": hasError || void 0, "aria-describedby": describedBy }),
670
- displayedMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: messageId2, className: hasError ? "fe-number-input__error" : "fe-number-input__helper", children: displayedMessage })
671
- ] });
672
- });
1307
+ }
1308
+ var NumberInput = (0, import_react10.forwardRef)(
1309
+ function NumberInput2({
1310
+ value,
1311
+ defaultValue = null,
1312
+ onValueChange,
1313
+ allowDecimal = true,
1314
+ decimals = 2,
1315
+ min,
1316
+ max,
1317
+ decimalSeparator = ".",
1318
+ thousandSeparator = ",",
1319
+ label,
1320
+ description,
1321
+ descriptionDisplay = "inline",
1322
+ helperText,
1323
+ error,
1324
+ errorMessage,
1325
+ isRequired = false,
1326
+ className,
1327
+ onBlur,
1328
+ onFocus,
1329
+ placeholder,
1330
+ required,
1331
+ endAdornment,
1332
+ "aria-describedby": ariaDescribedBy,
1333
+ "aria-labelledby": ariaLabelledBy,
1334
+ ...props
1335
+ }, ref) {
1336
+ const generatedId = (0, import_react10.useId)();
1337
+ const messageId2 = generatedId + "-message";
1338
+ const isControlled = value !== void 0;
1339
+ const [internalValue, setInternalValue] = (0, import_react10.useState)(defaultValue);
1340
+ const [focused, setFocused] = (0, import_react10.useState)(false);
1341
+ const actualValue = isControlled ? value ?? null : internalValue;
1342
+ const [text, setText] = (0, import_react10.useState)(
1343
+ actualValue === null ? "" : formatNumber(
1344
+ actualValue,
1345
+ decimals,
1346
+ thousandSeparator,
1347
+ decimalSeparator
1348
+ )
1349
+ );
1350
+ const fieldError = getFieldError(error, errorMessage);
1351
+ const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
1352
+ const labelId = generatedId + "-label";
1353
+ const resolvedDescription = description ?? helperText;
1354
+ const hasMessage = hasError || resolvedDescription && descriptionDisplay === "inline";
1355
+ const describedBy = getDescribedBy(
1356
+ ariaDescribedBy,
1357
+ hasMessage ? messageId2 : void 0
1358
+ );
1359
+ const labelledBy = getDescribedBy(
1360
+ ariaLabelledBy,
1361
+ label ? labelId : void 0
1362
+ );
1363
+ (0, import_react10.useEffect)(() => {
1364
+ if (!focused)
1365
+ setText(
1366
+ actualValue === null ? "" : formatNumber(
1367
+ actualValue,
1368
+ decimals,
1369
+ thousandSeparator,
1370
+ decimalSeparator
1371
+ )
1372
+ );
1373
+ }, [actualValue, decimalSeparator, decimals, focused, thousandSeparator]);
1374
+ const updateValue = (nextText) => {
1375
+ const next = normalizeNumberInput(nextText, {
1376
+ allowDecimal,
1377
+ decimals,
1378
+ decimalSeparator,
1379
+ thousandSeparator,
1380
+ min,
1381
+ max
1382
+ });
1383
+ setText(next.display);
1384
+ if (!isControlled) setInternalValue(next.value);
1385
+ onValueChange?.(next.value);
1386
+ };
1387
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1388
+ "label",
1389
+ {
1390
+ className: [
1391
+ "fe-number-input",
1392
+ hasError && "fe-number-input--error",
1393
+ className
1394
+ ].filter(Boolean).join(" "),
1395
+ children: [
1396
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1397
+ FieldLabel,
1398
+ {
1399
+ id: labelId,
1400
+ label,
1401
+ description: resolvedDescription,
1402
+ descriptionDisplay,
1403
+ isRequired
1404
+ }
1405
+ ),
1406
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "fe-number-input__control", children: [
1407
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1408
+ "input",
1409
+ {
1410
+ ref,
1411
+ inputMode: allowDecimal ? "decimal" : "numeric",
1412
+ value: text,
1413
+ placeholder,
1414
+ required: isRequired || required,
1415
+ onFocus: (event) => {
1416
+ setFocused(true);
1417
+ onFocus?.(event);
1418
+ },
1419
+ onChange: (event) => updateValue(event.target.value),
1420
+ onBlur: (event) => {
1421
+ setFocused(false);
1422
+ onBlur?.(event);
1423
+ },
1424
+ ...props,
1425
+ "aria-invalid": hasError || void 0,
1426
+ "aria-required": isRequired || void 0,
1427
+ "aria-labelledby": labelledBy,
1428
+ "aria-describedby": describedBy
1429
+ }
1430
+ ),
1431
+ isRequired && placeholder && !text && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "fe-number-input__placeholder", "aria-hidden": "true", children: [
1432
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: placeholder }),
1433
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "fe-field__required", children: "*" })
1434
+ ] }),
1435
+ endAdornment
1436
+ ] }),
1437
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1438
+ FieldMessage,
1439
+ {
1440
+ id: messageId2,
1441
+ error: fieldError,
1442
+ description: resolvedDescription,
1443
+ descriptionDisplay
1444
+ }
1445
+ )
1446
+ ]
1447
+ }
1448
+ );
1449
+ }
1450
+ );
673
1451
  NumberInput.displayName = "NumberInput";
674
- function CurrencyInput({ suffix = "VND", currencies, currency, defaultCurrency, onCurrencyChange, className, ...props }) {
675
- const [internalCurrency, setInternalCurrency] = (0, import_react6.useState)(defaultCurrency ?? currencies?.[0]?.code ?? "");
1452
+
1453
+ // packages/form-controls/src/controls/CurrencyInput/currency-input.tsx
1454
+ var import_react11 = require("react");
1455
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1456
+ function CurrencyInput({
1457
+ suffix = "VND",
1458
+ currencies,
1459
+ currency,
1460
+ defaultCurrency,
1461
+ onCurrencyChange,
1462
+ className,
1463
+ disabled,
1464
+ ...props
1465
+ }) {
1466
+ const [internalCurrency, setInternalCurrency] = (0, import_react11.useState)(
1467
+ defaultCurrency ?? currencies?.[0]?.code ?? ""
1468
+ );
676
1469
  const selectedCurrency = currency ?? internalCurrency;
677
1470
  const current = currencies?.find((item) => item.code === selectedCurrency);
678
1471
  const currencySuffix = current?.suffix ?? current?.code ?? suffix;
679
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: ["fe-currency-input", className].filter(Boolean).join(" "), children: [
680
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NumberInput, { ...props, className: "fe-currency-input__number" }),
681
- currencies?.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("select", { className: "fe-currency-input__currency", "aria-label": "Currency", value: selectedCurrency, onChange: (event) => {
682
- const next = currencies.find((item) => item.code === event.target.value);
683
- if (!next) return;
684
- if (currency === void 0) setInternalCurrency(next.code);
685
- onCurrencyChange?.(next);
686
- }, children: currencies.map((item) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: item.code, children: item.label ?? item.code }, item.code)) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-currency-input__suffix", children: currencySuffix })
687
- ] });
1472
+ const endAdornment = currencies?.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1473
+ Selection,
1474
+ {
1475
+ className: "fe-currency-input__currency",
1476
+ "aria-label": "Currency",
1477
+ options: currencies.map((item) => ({
1478
+ label: item.label ?? item.code,
1479
+ value: item.code
1480
+ })),
1481
+ disabled,
1482
+ value: selectedCurrency,
1483
+ size: "small",
1484
+ onChange: (value) => {
1485
+ const next = currencies.find((item) => item.code === String(value));
1486
+ if (!next) return;
1487
+ if (currency === void 0) setInternalCurrency(next.code);
1488
+ onCurrencyChange?.(next);
1489
+ }
1490
+ }
1491
+ ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fe-currency-input__suffix", children: currencySuffix });
1492
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1493
+ NumberInput,
1494
+ {
1495
+ ...props,
1496
+ disabled,
1497
+ className: ["fe-currency-input", className].filter(Boolean).join(" "),
1498
+ endAdornment
1499
+ }
1500
+ );
688
1501
  }
1502
+
1503
+ // packages/form-controls/src/controls/DateTimePicker/date-time-picker.tsx
1504
+ var import_react12 = require("react");
1505
+ var import_jsx_runtime17 = require("react/jsx-runtime");
689
1506
  var pad = (value) => String(value).padStart(2, "0");
690
1507
  function formatDate(date, format) {
691
1508
  return format.replace(/yyyy/g, String(date.getFullYear())).replace(/MM/g, pad(date.getMonth() + 1)).replace(/dd/g, pad(date.getDate())).replace(/HH/g, pad(date.getHours())).replace(/mm/g, pad(date.getMinutes()));
@@ -703,24 +1520,66 @@ function mergeDateTime(day, time) {
703
1520
  return next;
704
1521
  }
705
1522
  function DateTimePicker(props) {
706
- const { label, format = "dd/MM/yyyy HH:mm", disabled, placeholder, locale = "en-US", className, mode = "single" } = props;
1523
+ const {
1524
+ label,
1525
+ description,
1526
+ descriptionDisplay = "inline",
1527
+ helperText,
1528
+ error,
1529
+ errorMessage,
1530
+ isRequired = false,
1531
+ format = "dd/MM/yyyy HH:mm",
1532
+ disabled,
1533
+ placeholder,
1534
+ locale = "en-US",
1535
+ className,
1536
+ mode = "single",
1537
+ id,
1538
+ "aria-describedby": ariaDescribedBy,
1539
+ "aria-labelledby": ariaLabelledBy
1540
+ } = props;
1541
+ const generatedId = (0, import_react12.useId)();
1542
+ const triggerId = id ?? generatedId + "-trigger";
1543
+ const labelId = generatedId + "-label";
1544
+ const messageId2 = generatedId + "-message";
1545
+ const fieldError = getFieldError(error, errorMessage);
1546
+ const hasError = fieldError !== void 0 && fieldError !== false && fieldError !== null;
1547
+ const resolvedDescription = description ?? helperText;
1548
+ const hasMessage = hasError || resolvedDescription && descriptionDisplay === "inline";
1549
+ const describedBy = getDescribedBy(
1550
+ ariaDescribedBy,
1551
+ hasMessage ? messageId2 : void 0
1552
+ );
1553
+ const labelledBy = getDescribedBy(
1554
+ ariaLabelledBy,
1555
+ label ? labelId : void 0
1556
+ );
707
1557
  const isRange = mode === "range";
708
1558
  const controlled = props.value !== void 0;
709
- const [singleInternal, setSingleInternal] = (0, import_react6.useState)((!isRange ? props.defaultValue : null) ?? null);
710
- const [rangeInternal, setRangeInternal] = (0, import_react6.useState)((isRange ? props.defaultValue : void 0) ?? [null, null]);
1559
+ const [singleInternal, setSingleInternal] = (0, import_react12.useState)(
1560
+ (!isRange ? props.defaultValue : null) ?? null
1561
+ );
1562
+ const [rangeInternal, setRangeInternal] = (0, import_react12.useState)(
1563
+ (isRange ? props.defaultValue : void 0) ?? [null, null]
1564
+ );
711
1565
  const singleValue = !isRange ? props.value ?? singleInternal : null;
712
1566
  const rangeValue = isRange ? props.value ?? rangeInternal : [null, null];
713
- const [open, setOpen] = (0, import_react6.useState)(false);
714
- const [month, setMonth] = (0, import_react6.useState)(() => new Date((isRange ? rangeValue[0] : singleValue) ?? /* @__PURE__ */ new Date()));
715
- const [editingEnd, setEditingEnd] = (0, import_react6.useState)(false);
716
- const rootRef = (0, import_react6.useRef)(null);
717
- (0, import_react6.useEffect)(() => {
1567
+ const [open, setOpen] = (0, import_react12.useState)(false);
1568
+ const [month, setMonth] = (0, import_react12.useState)(
1569
+ () => new Date((isRange ? rangeValue[0] : singleValue) ?? /* @__PURE__ */ new Date())
1570
+ );
1571
+ const [editingEnd, setEditingEnd] = (0, import_react12.useState)(false);
1572
+ const rootRef = (0, import_react12.useRef)(null);
1573
+ (0, import_react12.useEffect)(() => {
718
1574
  const onPointerDown = (event) => {
719
1575
  if (!rootRef.current?.contains(event.target)) setOpen(false);
720
1576
  };
721
1577
  document.addEventListener("mousedown", onPointerDown);
722
1578
  return () => document.removeEventListener("mousedown", onPointerDown);
723
1579
  }, []);
1580
+ (0, import_react12.useEffect)(() => {
1581
+ if (disabled) setOpen(false);
1582
+ }, [disabled]);
724
1583
  const setSingle = (next) => {
725
1584
  if (!controlled) setSingleInternal(next);
726
1585
  props.onChange?.(next);
@@ -731,13 +1590,24 @@ function DateTimePicker(props) {
731
1590
  };
732
1591
  const selectDay = (day) => {
733
1592
  if (!isRange) {
734
- setSingle(mergeDateTime(day, singleValue ? `${pad(singleValue.getHours())}:${pad(singleValue.getMinutes())}` : "00:00"));
1593
+ setSingle(
1594
+ mergeDateTime(
1595
+ day,
1596
+ singleValue ? pad(singleValue.getHours()) + ":" + pad(singleValue.getMinutes()) : "00:00"
1597
+ )
1598
+ );
735
1599
  setOpen(false);
736
1600
  return;
737
1601
  }
738
1602
  const [start, end] = rangeValue;
739
1603
  if (!start || end || editingEnd) {
740
- setRange([mergeDateTime(day, start ? `${pad(start.getHours())}:${pad(start.getMinutes())}` : "00:00"), null]);
1604
+ setRange([
1605
+ mergeDateTime(
1606
+ day,
1607
+ start ? pad(start.getHours()) + ":" + pad(start.getMinutes()) : "00:00"
1608
+ ),
1609
+ null
1610
+ ]);
741
1611
  setEditingEnd(false);
742
1612
  return;
743
1613
  }
@@ -745,97 +1615,200 @@ function DateTimePicker(props) {
745
1615
  setRange(nextEnd < start ? [nextEnd, start] : [start, nextEnd]);
746
1616
  setEditingEnd(false);
747
1617
  };
748
- const shownValue = isRange ? [rangeValue[0] && formatDate(rangeValue[0], format), rangeValue[1] && formatDate(rangeValue[1], format)].filter(Boolean).join(" \u2014 ") : singleValue && formatDate(singleValue, format);
1618
+ const shownValue = isRange ? [
1619
+ rangeValue[0] && formatDate(rangeValue[0], format),
1620
+ rangeValue[1] && formatDate(rangeValue[1], format)
1621
+ ].filter(Boolean).join(" \u2014 ") : singleValue && formatDate(singleValue, format);
749
1622
  const firstDay = new Date(month.getFullYear(), month.getMonth(), 1);
750
1623
  const offset = (firstDay.getDay() + 6) % 7;
751
- const days = Array.from({ length: 42 }, (_, index) => new Date(month.getFullYear(), month.getMonth(), index - offset + 1));
1624
+ const days = Array.from(
1625
+ { length: 42 },
1626
+ (_, index) => new Date(month.getFullYear(), month.getMonth(), index - offset + 1)
1627
+ );
752
1628
  const selectedForTime = isRange ? editingEnd ? rangeValue[1] : rangeValue[0] : singleValue;
753
1629
  const setTime = (time) => {
754
1630
  if (!selectedForTime) return;
755
1631
  const next = mergeDateTime(selectedForTime, time);
756
- if (isRange) setRange(editingEnd ? [rangeValue[0], next] : [next, rangeValue[1]]);
1632
+ if (isRange)
1633
+ setRange(editingEnd ? [rangeValue[0], next] : [next, rangeValue[1]]);
757
1634
  else setSingle(next);
758
1635
  };
759
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref: rootRef, className: ["fe-datetime-picker", className].filter(Boolean).join(" "), children: [
760
- label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "fe-datetime-picker__label", children: label }),
761
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "fe-datetime-picker__trigger", disabled, "aria-expanded": open, onClick: () => setOpen((current) => !current), children: [
762
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": "true", children: "\u25F7" }),
763
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: shownValue || placeholder || (isRange ? "Select date range" : "Select date and time") })
764
- ] }),
765
- open && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "fe-datetime-picker__popper", role: "dialog", "aria-label": "Date and time picker", children: [
766
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "fe-datetime-picker__month", children: [
767
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": "Previous month", onClick: () => setMonth((current) => new Date(current.getFullYear(), current.getMonth() - 1, 1)), children: "\u2039" }),
768
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { children: month.toLocaleDateString(locale, { month: "long", year: "numeric" }) }),
769
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": "Next month", onClick: () => setMonth((current) => new Date(current.getFullYear(), current.getMonth() + 1, 1)), children: "\u203A" })
770
- ] }),
771
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "fe-datetime-picker__weekdays", children: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"].map((day) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: day }, day)) }),
772
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "fe-datetime-picker__days", children: days.map((day) => {
773
- const inMonth = day.getMonth() === month.getMonth();
774
- const selected = isRange ? sameDay(day, rangeValue[0]) || sameDay(day, rangeValue[1]) : sameDay(day, singleValue);
775
- const inRange = isRange && rangeValue[0] && rangeValue[1] && day > startOfDay(rangeValue[0]) && day < startOfDay(rangeValue[1]);
776
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: [!inMonth && "is-other-month", selected && "is-selected", inRange && "is-in-range"].filter(Boolean).join(" "), onClick: () => selectDay(day), children: day.getDate() }, day.toISOString());
777
- }) }),
778
- isRange && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "fe-datetime-picker__range-tabs", children: [
779
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: !editingEnd ? "is-active" : "", onClick: () => setEditingEnd(false), children: "Start" }),
780
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: editingEnd ? "is-active" : "", onClick: () => setEditingEnd(true), children: "End" })
781
- ] }),
782
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "fe-datetime-picker__time", children: [
783
- "Time",
784
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "time", value: selectedForTime ? `${pad(selectedForTime.getHours())}:${pad(selectedForTime.getMinutes())}` : "00:00", onChange: (event) => setTime(event.target.value), disabled: !selectedForTime })
785
- ] })
786
- ] })
787
- ] });
788
- }
789
-
790
- // packages/tooltip/src/index.tsx
791
- var import_react7 = require("react");
792
- var import_jsx_runtime8 = require("react/jsx-runtime");
793
- function Tooltip({ content, children, placement = "top", disabled, className, ...props }) {
794
- const [visible, setVisible] = (0, import_react7.useState)(false);
795
- const id = (0, import_react7.useId)();
796
- const trigger = (0, import_react7.cloneElement)(children, { "aria-describedby": visible ? id : void 0, onMouseEnter: (event) => {
797
- children.props.onMouseEnter?.(event);
798
- setVisible(true);
799
- }, onMouseLeave: (event) => {
800
- children.props.onMouseLeave?.(event);
801
- setVisible(false);
802
- }, onFocus: (event) => {
803
- children.props.onFocus?.(event);
804
- setVisible(true);
805
- }, onBlur: (event) => {
806
- children.props.onBlur?.(event);
807
- setVisible(false);
808
- } });
809
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: ["fe-tooltip", `fe-tooltip--${placement}`, className].filter(Boolean).join(" "), ...props, children: [
810
- trigger,
811
- visible && !disabled && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { id, role: "tooltip", className: "fe-tooltip__content", children: content })
812
- ] });
1636
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1637
+ "div",
1638
+ {
1639
+ ref: rootRef,
1640
+ className: [
1641
+ "fe-datetime-picker",
1642
+ hasError && "fe-datetime-picker--error",
1643
+ className
1644
+ ].filter(Boolean).join(" "),
1645
+ children: [
1646
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1647
+ FieldLabel,
1648
+ {
1649
+ id: labelId,
1650
+ label,
1651
+ description: resolvedDescription,
1652
+ descriptionDisplay,
1653
+ isRequired
1654
+ }
1655
+ ),
1656
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1657
+ "button",
1658
+ {
1659
+ id: triggerId,
1660
+ type: "button",
1661
+ className: "fe-datetime-picker__trigger",
1662
+ disabled,
1663
+ "aria-invalid": hasError || void 0,
1664
+ "aria-required": isRequired || void 0,
1665
+ "aria-labelledby": labelledBy,
1666
+ "aria-describedby": describedBy,
1667
+ "aria-expanded": open,
1668
+ onClick: () => setOpen((current) => !current),
1669
+ children: [
1670
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: "\u25F7" }),
1671
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1672
+ "span",
1673
+ {
1674
+ className: !shownValue && placeholder ? "fe-datetime-picker__value is-placeholder" : "fe-datetime-picker__value",
1675
+ children: [
1676
+ shownValue || placeholder || (isRange ? "Select date range" : "Select date and time"),
1677
+ isRequired && placeholder && !shownValue && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fe-field__required", "aria-hidden": "true", children: "*" })
1678
+ ]
1679
+ }
1680
+ )
1681
+ ]
1682
+ }
1683
+ ),
1684
+ open && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1685
+ "div",
1686
+ {
1687
+ className: "fe-datetime-picker__popper",
1688
+ role: "dialog",
1689
+ "aria-label": "Date and time picker",
1690
+ children: [
1691
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "fe-datetime-picker__month", children: [
1692
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1693
+ "button",
1694
+ {
1695
+ type: "button",
1696
+ "aria-label": "Previous month",
1697
+ onClick: () => setMonth(
1698
+ (current) => new Date(current.getFullYear(), current.getMonth() - 1, 1)
1699
+ ),
1700
+ children: "\u2039"
1701
+ }
1702
+ ),
1703
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: month.toLocaleDateString(locale, {
1704
+ month: "long",
1705
+ year: "numeric"
1706
+ }) }),
1707
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1708
+ "button",
1709
+ {
1710
+ type: "button",
1711
+ "aria-label": "Next month",
1712
+ onClick: () => setMonth(
1713
+ (current) => new Date(current.getFullYear(), current.getMonth() + 1, 1)
1714
+ ),
1715
+ children: "\u203A"
1716
+ }
1717
+ )
1718
+ ] }),
1719
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fe-datetime-picker__weekdays", children: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"].map((day) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: day }, day)) }),
1720
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fe-datetime-picker__days", children: days.map((day) => {
1721
+ const inMonth = day.getMonth() === month.getMonth();
1722
+ const selected = isRange ? sameDay(day, rangeValue[0]) || sameDay(day, rangeValue[1]) : sameDay(day, singleValue);
1723
+ const inRange = isRange && rangeValue[0] && rangeValue[1] && day > startOfDay(rangeValue[0]) && day < startOfDay(rangeValue[1]);
1724
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1725
+ "button",
1726
+ {
1727
+ type: "button",
1728
+ className: [
1729
+ !inMonth && "is-other-month",
1730
+ selected && "is-selected",
1731
+ inRange && "is-in-range"
1732
+ ].filter(Boolean).join(" "),
1733
+ onClick: () => selectDay(day),
1734
+ children: day.getDate()
1735
+ },
1736
+ day.toISOString()
1737
+ );
1738
+ }) }),
1739
+ isRange && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "fe-datetime-picker__range-tabs", children: [
1740
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1741
+ "button",
1742
+ {
1743
+ type: "button",
1744
+ className: !editingEnd ? "is-active" : "",
1745
+ onClick: () => setEditingEnd(false),
1746
+ children: "Start"
1747
+ }
1748
+ ),
1749
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1750
+ "button",
1751
+ {
1752
+ type: "button",
1753
+ className: editingEnd ? "is-active" : "",
1754
+ onClick: () => setEditingEnd(true),
1755
+ children: "End"
1756
+ }
1757
+ )
1758
+ ] }),
1759
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "fe-datetime-picker__time", children: [
1760
+ "Time",
1761
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1762
+ "input",
1763
+ {
1764
+ type: "time",
1765
+ value: selectedForTime ? pad(selectedForTime.getHours()) + ":" + pad(selectedForTime.getMinutes()) : "00:00",
1766
+ onChange: (event) => setTime(event.target.value),
1767
+ disabled: !selectedForTime
1768
+ }
1769
+ )
1770
+ ] })
1771
+ ]
1772
+ }
1773
+ ),
1774
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1775
+ FieldMessage,
1776
+ {
1777
+ id: messageId2,
1778
+ error: fieldError,
1779
+ description: resolvedDescription,
1780
+ descriptionDisplay
1781
+ }
1782
+ )
1783
+ ]
1784
+ }
1785
+ );
813
1786
  }
814
1787
 
815
1788
  // packages/expandable-section/src/index.tsx
816
- var import_react8 = require("react");
817
- var import_jsx_runtime9 = require("react/jsx-runtime");
1789
+ var import_react13 = require("react");
1790
+ var import_jsx_runtime18 = require("react/jsx-runtime");
818
1791
  function ExpandableSection({ title, children, expanded, defaultExpanded = false, onExpandedChange, disabled, className, ...props }) {
819
- const [internalExpanded, setInternalExpanded] = (0, import_react8.useState)(defaultExpanded);
1792
+ const [internalExpanded, setInternalExpanded] = (0, import_react13.useState)(defaultExpanded);
820
1793
  const isExpanded = expanded ?? internalExpanded;
821
- const id = (0, import_react8.useId)();
1794
+ const id = (0, import_react13.useId)();
822
1795
  const toggle = () => {
823
1796
  if (disabled) return;
824
1797
  const next = !isExpanded;
825
1798
  if (expanded === void 0) setInternalExpanded(next);
826
1799
  onExpandedChange?.(next);
827
1800
  };
828
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: ["fe-expandable-section", isExpanded && "fe-expandable-section--expanded", disabled && "fe-expandable-section--disabled", className].filter(Boolean).join(" "), ...props, children: [
829
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "fe-expandable-section__trigger", type: "button", "aria-expanded": isExpanded, "aria-controls": id, disabled, onClick: toggle, children: [
830
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: title }),
831
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "fe-expandable-section__chevron", "aria-hidden": "true" })
1801
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: ["fe-expandable-section", isExpanded && "fe-expandable-section--expanded", disabled && "fe-expandable-section--disabled", className].filter(Boolean).join(" "), ...props, children: [
1802
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "fe-expandable-section__trigger", type: "button", "aria-expanded": isExpanded, "aria-controls": id, disabled, onClick: toggle, children: [
1803
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: title }),
1804
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fe-expandable-section__chevron", "aria-hidden": "true" })
832
1805
  ] }),
833
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { id, className: "fe-expandable-section__content", "aria-hidden": !isExpanded, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fe-expandable-section__content-inner", children }) })
1806
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { id, className: "fe-expandable-section__content", "aria-hidden": !isExpanded, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fe-expandable-section__content-inner", children }) })
834
1807
  ] });
835
1808
  }
836
1809
 
837
1810
  // packages/loading/src/index.tsx
838
- var import_jsx_runtime10 = require("react/jsx-runtime");
1811
+ var import_jsx_runtime19 = require("react/jsx-runtime");
839
1812
  var sizes = {
840
1813
  small: "16px",
841
1814
  medium: "24px",
@@ -848,15 +1821,15 @@ function Loading({ size = "medium", color = "#2878f0", label, className, style,
848
1821
  "--fe-loading-color": color,
849
1822
  ...style
850
1823
  };
851
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: ["fe-loading", className].filter(Boolean).join(" "), style: loadingStyle, role: "status", ...props, children: [
852
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "fe-loading__spinner", "aria-hidden": "true" }),
853
- label && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "fe-loading__label", children: label }),
854
- !label && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "fe-loading__sr-only", children: "Loading" })
1824
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: ["fe-loading", className].filter(Boolean).join(" "), style: loadingStyle, role: "status", ...props, children: [
1825
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "fe-loading__spinner", "aria-hidden": "true" }),
1826
+ label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "fe-loading__label", children: label }),
1827
+ !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "fe-loading__sr-only", children: "Loading" })
855
1828
  ] });
856
1829
  }
857
1830
 
858
1831
  // packages/skeleton/src/index.tsx
859
- var import_jsx_runtime11 = require("react/jsx-runtime");
1832
+ var import_jsx_runtime20 = require("react/jsx-runtime");
860
1833
  var pixels = (value) => typeof value === "number" ? `${value}px` : value;
861
1834
  function SkeletonBase({ variant = "box", shape, width, height, count = 1, animated = true, className, style, ...props }) {
862
1835
  const resolvedVariant = shape ?? variant;
@@ -867,7 +1840,7 @@ function SkeletonBase({ variant = "box", shape, width, height, count = 1, animat
867
1840
  "--fe-skeleton-height": resolvedHeight,
868
1841
  ...style
869
1842
  };
870
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: Array.from({ length: Math.max(1, count) }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1843
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children: Array.from({ length: Math.max(1, count) }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
871
1844
  "div",
872
1845
  {
873
1846
  className: ["fe-skeleton", `fe-skeleton--${resolvedVariant}`, animated && "fe-skeleton--animated", className].filter(Boolean).join(" "),
@@ -879,16 +1852,16 @@ function SkeletonBase({ variant = "box", shape, width, height, count = 1, animat
879
1852
  )) });
880
1853
  }
881
1854
  function SkeletonCircle({ size = 40, ...props }) {
882
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBase, { variant: "circle", width: size, height: size, ...props });
1855
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SkeletonBase, { variant: "circle", width: size, height: size, ...props });
883
1856
  }
884
1857
  function SkeletonSquare({ size = 80, ...props }) {
885
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBase, { variant: "box", width: size, height: size, ...props });
1858
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SkeletonBase, { variant: "box", width: size, height: size, ...props });
886
1859
  }
887
1860
  function SkeletonBox({ width = "100%", height = 80, ...props }) {
888
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBase, { variant: "box", width, height, ...props });
1861
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SkeletonBase, { variant: "box", width, height, ...props });
889
1862
  }
890
1863
  function SkeletonLine({ width = "100%", height = 12, ...props }) {
891
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBase, { variant: "line", width, height, ...props });
1864
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SkeletonBase, { variant: "line", width, height, ...props });
892
1865
  }
893
1866
  var Skeleton = Object.assign(SkeletonBase, {
894
1867
  Circle: SkeletonCircle,
@@ -898,9 +1871,9 @@ var Skeleton = Object.assign(SkeletonBase, {
898
1871
  });
899
1872
 
900
1873
  // packages/modal/src/index.tsx
901
- var import_react9 = require("react");
902
- var import_react_dom2 = require("react-dom");
903
- var import_jsx_runtime12 = require("react/jsx-runtime");
1874
+ var import_react14 = require("react");
1875
+ var import_react_dom3 = require("react-dom");
1876
+ var import_jsx_runtime21 = require("react/jsx-runtime");
904
1877
  function Modal({
905
1878
  open,
906
1879
  onClose,
@@ -916,9 +1889,9 @@ function Modal({
916
1889
  className,
917
1890
  ...props
918
1891
  }) {
919
- const titleId = (0, import_react9.useId)();
920
- const panelRef = (0, import_react9.useRef)(null);
921
- (0, import_react9.useEffect)(() => {
1892
+ const titleId = (0, import_react14.useId)();
1893
+ const panelRef = (0, import_react14.useRef)(null);
1894
+ (0, import_react14.useEffect)(() => {
922
1895
  if (!open) return;
923
1896
  const onKeyDown = (event) => {
924
1897
  if (event.key === "Escape") onClose();
@@ -929,10 +1902,10 @@ function Modal({
929
1902
  }, [onClose, open]);
930
1903
  if (!open || typeof document === "undefined") return null;
931
1904
  const hasFooter = footer || actions.length > 0;
932
- return (0, import_react_dom2.createPortal)(
933
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "fe-modal-backdrop", role: "presentation", onMouseDown: (event) => {
1905
+ return (0, import_react_dom3.createPortal)(
1906
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fe-modal-backdrop", role: "presentation", onMouseDown: (event) => {
934
1907
  if (event.target === event.currentTarget && closeOnBackdropClick) onClose();
935
- }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1908
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
936
1909
  "div",
937
1910
  {
938
1911
  ref: panelRef,
@@ -944,17 +1917,17 @@ function Modal({
944
1917
  tabIndex: -1,
945
1918
  ...props,
946
1919
  children: [
947
- (title || description || closeButton) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: "fe-modal__header", children: [
948
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "fe-modal__heading", children: [
949
- title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { id: titleId, children: title }),
950
- description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: description })
1920
+ (title || description || closeButton) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("header", { className: "fe-modal__header", children: [
1921
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "fe-modal__heading", children: [
1922
+ title && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { id: titleId, children: title }),
1923
+ description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: description })
951
1924
  ] }),
952
- closeButton && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { hierarchy: "tertiary-gray", size: "32", iconOnly: true, icon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CloseIcon, {}), "aria-label": closeLabel, onClick: onClose })
1925
+ closeButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { hierarchy: "tertiary-gray", size: "32", iconOnly: true, icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseIcon, {}), "aria-label": closeLabel, onClick: onClose })
953
1926
  ] }),
954
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "fe-modal__body", children }),
955
- hasFooter && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("footer", { className: "fe-modal__footer", children: [
956
- footer && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "fe-modal__footer-content", children: footer }),
957
- actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "fe-modal__actions", children: actions.map(({ label, ...action }, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { ...action, children: label }, index)) })
1927
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fe-modal__body", children }),
1928
+ hasFooter && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("footer", { className: "fe-modal__footer", children: [
1929
+ footer && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fe-modal__footer-content", children: footer }),
1930
+ actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fe-modal__actions", children: actions.map(({ label, ...action }, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { ...action, children: label }, index)) })
958
1931
  ] })
959
1932
  ]
960
1933
  }
@@ -964,7 +1937,7 @@ function Modal({
964
1937
  }
965
1938
 
966
1939
  // packages/progress/src/index.tsx
967
- var import_jsx_runtime13 = require("react/jsx-runtime");
1940
+ var import_jsx_runtime22 = require("react/jsx-runtime");
968
1941
  function ProgressBar({ value, max = 100, label, showValue = true, size = "medium", color = "#2878f0", className, style, "aria-label": ariaLabel, ...props }) {
969
1942
  const indeterminate = value === null || value === void 0;
970
1943
  const percentage = indeterminate ? 0 : Math.min(100, Math.max(0, Number(value) / Math.max(1, max) * 100));
@@ -974,17 +1947,17 @@ function ProgressBar({ value, max = 100, label, showValue = true, size = "medium
974
1947
  ...style
975
1948
  };
976
1949
  const visibleValue = `${Math.round(percentage)}%`;
977
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: ["fe-progress", `fe-progress--${size}`, indeterminate && "fe-progress--indeterminate", className].filter(Boolean).join(" "), style: progressStyle, ...props, children: [
978
- (label || !indeterminate && showValue) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "fe-progress__meta", children: [
979
- label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "fe-progress__label", children: label }),
980
- !indeterminate && showValue && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("output", { className: "fe-progress__value", children: visibleValue })
1950
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: ["fe-progress", `fe-progress--${size}`, indeterminate && "fe-progress--indeterminate", className].filter(Boolean).join(" "), style: progressStyle, ...props, children: [
1951
+ (label || !indeterminate && showValue) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "fe-progress__meta", children: [
1952
+ label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "fe-progress__label", children: label }),
1953
+ !indeterminate && showValue && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("output", { className: "fe-progress__value", children: visibleValue })
981
1954
  ] }),
982
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "fe-progress__track", role: "progressbar", "aria-label": ariaLabel ?? (typeof label === "string" ? label : "Progress"), "aria-valuemin": indeterminate ? void 0 : 0, "aria-valuemax": indeterminate ? void 0 : max, "aria-valuenow": indeterminate ? void 0 : Number(value), "aria-valuetext": indeterminate ? "Loading" : visibleValue, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "fe-progress__indicator" }) })
1955
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "fe-progress__track", role: "progressbar", "aria-label": ariaLabel ?? (typeof label === "string" ? label : "Progress"), "aria-valuemin": indeterminate ? void 0 : 0, "aria-valuemax": indeterminate ? void 0 : max, "aria-valuenow": indeterminate ? void 0 : Number(value), "aria-valuetext": indeterminate ? "Loading" : visibleValue, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "fe-progress__indicator" }) })
983
1956
  ] });
984
1957
  }
985
1958
 
986
1959
  // packages/chip/src/index.tsx
987
- var import_jsx_runtime14 = require("react/jsx-runtime");
1960
+ var import_jsx_runtime23 = require("react/jsx-runtime");
988
1961
  var statuses = ["default", "info", "success", "warning", "error", "neutral", "pending", "processing"];
989
1962
  function Chip({ children, status = "default", color, variant = "subtle", dot = false, onRemove, removeLabel = "Remove", className, style, ...props }) {
990
1963
  const usesCustomColor = Boolean(color);
@@ -993,16 +1966,16 @@ function Chip({ children, status = "default", color, variant = "subtle", dot = f
993
1966
  ...style
994
1967
  };
995
1968
  const resolvedStatus = statuses.includes(status) ? status : "default";
996
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: ["fe-chip", `fe-chip--${variant}`, `fe-chip--${usesCustomColor ? "custom" : resolvedStatus}`, className].filter(Boolean).join(" "), style: chipStyle, ...props, children: [
997
- dot && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fe-chip__dot", "aria-hidden": "true" }),
998
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fe-chip__content", children }),
999
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CloseIcon, { size: 14 }), "aria-label": removeLabel, onClick: onRemove, className: "fe-chip__remove" })
1969
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: ["fe-chip", `fe-chip--${variant}`, `fe-chip--${usesCustomColor ? "custom" : resolvedStatus}`, className].filter(Boolean).join(" "), style: chipStyle, ...props, children: [
1970
+ dot && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "fe-chip__dot", "aria-hidden": "true" }),
1971
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "fe-chip__content", children }),
1972
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CloseIcon, { size: 14 }), "aria-label": removeLabel, onClick: onRemove, className: "fe-chip__remove" })
1000
1973
  ] });
1001
1974
  }
1002
1975
 
1003
1976
  // packages/message/src/index.tsx
1004
- var import_react10 = require("react");
1005
- var import_jsx_runtime15 = require("react/jsx-runtime");
1977
+ var import_react15 = require("react");
1978
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1006
1979
  var messageId = 0;
1007
1980
  var entries = [];
1008
1981
  var listeners = /* @__PURE__ */ new Set();
@@ -1035,22 +2008,22 @@ var message = {
1035
2008
  };
1036
2009
  var icons = { success: "\u2713", info: "i", warning: "!", error: "\xD7" };
1037
2010
  function Message({ maxCount = 4, closeLabel = "Close notification", className, ...props }) {
1038
- const [visibleEntries, setVisibleEntries] = (0, import_react10.useState)(entries);
1039
- (0, import_react10.useEffect)(() => {
2011
+ const [visibleEntries, setVisibleEntries] = (0, import_react15.useState)(entries);
2012
+ (0, import_react15.useEffect)(() => {
1040
2013
  const listener = (nextEntries) => setVisibleEntries(nextEntries);
1041
2014
  listeners.add(listener);
1042
2015
  return () => {
1043
2016
  listeners.delete(listener);
1044
2017
  };
1045
2018
  }, []);
1046
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: ["fe-message-viewport", className].filter(Boolean).join(" "), "aria-live": "polite", ...props, children: visibleEntries.slice(-Math.max(1, maxCount)).map((entry) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: `fe-message fe-message--${entry.severity ?? "info"}`, role: entry.severity === "error" ? "alert" : "status", children: [
1047
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "fe-message__icon", "aria-hidden": "true", children: icons[entry.severity ?? "info"] }),
1048
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "fe-message__body", children: [
1049
- entry.title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "fe-message__title", children: entry.title }),
1050
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "fe-message__content", children: entry.content })
2019
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: ["fe-message-viewport", className].filter(Boolean).join(" "), "aria-live": "polite", ...props, children: visibleEntries.slice(-Math.max(1, maxCount)).map((entry) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: `fe-message fe-message--${entry.severity ?? "info"}`, role: entry.severity === "error" ? "alert" : "status", children: [
2020
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "fe-message__icon", "aria-hidden": "true", children: icons[entry.severity ?? "info"] }),
2021
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "fe-message__body", children: [
2022
+ entry.title && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("strong", { className: "fe-message__title", children: entry.title }),
2023
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "fe-message__content", children: entry.content })
1051
2024
  ] }),
1052
- entry.action && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "fe-message__action", children: entry.action }),
1053
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { className: "fe-message__close", hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: "\xD7", "aria-label": closeLabel, onClick: () => dismiss(entry.id) })
2025
+ entry.action && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "fe-message__action", children: entry.action }),
2026
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { className: "fe-message__close", hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: "\xD7", "aria-label": closeLabel, onClick: () => dismiss(entry.id) })
1054
2027
  ] }, entry.id)) });
1055
2028
  }
1056
2029
  ((Message2) => {
@@ -1064,8 +2037,8 @@ function Message({ maxCount = 4, closeLabel = "Close notification", className, .
1064
2037
  })(Message || (Message = {}));
1065
2038
 
1066
2039
  // packages/snackbar/src/index.tsx
1067
- var import_react11 = require("react");
1068
- var import_jsx_runtime16 = require("react/jsx-runtime");
2040
+ var import_react16 = require("react");
2041
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1069
2042
  function Snackbar({
1070
2043
  open,
1071
2044
  message: message2,
@@ -1079,12 +2052,12 @@ function Snackbar({
1079
2052
  }) {
1080
2053
  const vertical = anchorOrigin.vertical ?? "bottom";
1081
2054
  const horizontal = anchorOrigin.horizontal ?? "center";
1082
- (0, import_react11.useEffect)(() => {
2055
+ (0, import_react16.useEffect)(() => {
1083
2056
  if (!open || autoHideDuration === null) return void 0;
1084
2057
  const timer = window.setTimeout(() => onClose?.("timeout"), autoHideDuration);
1085
2058
  return () => window.clearTimeout(timer);
1086
2059
  }, [open, autoHideDuration, onClose]);
1087
- (0, import_react11.useEffect)(() => {
2060
+ (0, import_react16.useEffect)(() => {
1088
2061
  if (!open) return void 0;
1089
2062
  const onKeyDown = (event) => {
1090
2063
  if (event.key === "Escape") onClose?.("escapeKeyDown");
@@ -1093,10 +2066,10 @@ function Snackbar({
1093
2066
  return () => window.removeEventListener("keydown", onKeyDown);
1094
2067
  }, [open, onClose]);
1095
2068
  if (!open) return null;
1096
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: ["fe-snackbar", `fe-snackbar--${vertical}`, `fe-snackbar--${horizontal}`, className].filter(Boolean).join(" "), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "fe-snackbar__content", role: "status", "aria-live": "polite", children: [
1097
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fe-snackbar__message", children: message2 }),
1098
- action && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fe-snackbar__action", children: action }),
1099
- onClose && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { className: "fe-snackbar__close", hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: "\xD7", "aria-label": closeLabel, onClick: () => onClose("closeButton") })
2069
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: ["fe-snackbar", `fe-snackbar--${vertical}`, `fe-snackbar--${horizontal}`, className].filter(Boolean).join(" "), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "fe-snackbar__content", role: "status", "aria-live": "polite", children: [
2070
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "fe-snackbar__message", children: message2 }),
2071
+ action && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "fe-snackbar__action", children: action }),
2072
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button, { className: "fe-snackbar__close", hierarchy: "tertiary-gray", size: "24", iconOnly: true, icon: "\xD7", "aria-label": closeLabel, onClick: () => onClose("closeButton") })
1100
2073
  ] }) });
1101
2074
  }
1102
2075
  // Annotate the CommonJS export names for ESM import in node:
@@ -1135,7 +2108,24 @@ function Snackbar({
1135
2108
  TextInput,
1136
2109
  Toggle,
1137
2110
  Tooltip,
2111
+ arrow_left,
2112
+ check_square_fill,
2113
+ chevron_down,
2114
+ chevron_left,
2115
+ chevron_right,
2116
+ chevron_up,
2117
+ copy,
1138
2118
  formatNumber,
1139
2119
  getIconSize,
1140
- message
2120
+ key,
2121
+ lock,
2122
+ lock_unlocked,
2123
+ log_out,
2124
+ message,
2125
+ minus_square,
2126
+ plus,
2127
+ plus_square,
2128
+ search,
2129
+ trash,
2130
+ x_close
1141
2131
  });