@x-plat/design-system 0.5.16 → 0.5.17

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.
@@ -66,7 +66,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
66
66
  }
67
67
  if (left < 8) left = 8;
68
68
  setPosition({
69
- position: { top, left, width: triggerRect.width },
69
+ position: { top, left },
70
70
  direction
71
71
  });
72
72
  }, [triggerRef, popRef]);
@@ -30,7 +30,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
30
30
  }
31
31
  if (left < 8) left = 8;
32
32
  setPosition({
33
- position: { top, left, width: triggerRect.width },
33
+ position: { top, left },
34
34
  direction
35
35
  });
36
36
  }, [triggerRef, popRef]);
@@ -66,7 +66,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
66
66
  }
67
67
  if (left < 8) left = 8;
68
68
  setPosition({
69
- position: { top, left, width: triggerRect.width },
69
+ position: { top, left },
70
70
  direction
71
71
  });
72
72
  }, [triggerRef, popRef]);
@@ -30,7 +30,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
30
30
  }
31
31
  if (left < 8) left = 8;
32
32
  setPosition({
33
- position: { top, left, width: triggerRect.width },
33
+ position: { top, left },
34
34
  direction
35
35
  });
36
36
  }, [triggerRef, popRef]);
@@ -67,7 +67,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
67
67
  }
68
68
  if (left < 8) left = 8;
69
69
  setPosition({
70
- position: { top, left, width: triggerRect.width },
70
+ position: { top, left },
71
71
  direction
72
72
  });
73
73
  }, [triggerRef, popRef]);
@@ -1220,7 +1220,7 @@ var SelectRoot = (props) => {
1220
1220
  {
1221
1221
  className: clsx_default("lib-xplat-select-content", position.direction, stateClass),
1222
1222
  ref: contentRef,
1223
- style: { ...position.position, minWidth: position.position.width },
1223
+ style: { ...position.position, width: triggerRef.current?.offsetWidth },
1224
1224
  role: "listbox",
1225
1225
  children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(context_default.Provider, { value: ctxValue, children: itemChildren })
1226
1226
  }
@@ -30,7 +30,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
30
30
  }
31
31
  if (left < 8) left = 8;
32
32
  setPosition({
33
- position: { top, left, width: triggerRect.width },
33
+ position: { top, left },
34
34
  direction
35
35
  });
36
36
  }, [triggerRef, popRef]);
@@ -1183,7 +1183,7 @@ var SelectRoot = (props) => {
1183
1183
  {
1184
1184
  className: clsx_default("lib-xplat-select-content", position.direction, stateClass),
1185
1185
  ref: contentRef,
1186
- style: { ...position.position, minWidth: position.position.width },
1186
+ style: { ...position.position, width: triggerRef.current?.offsetWidth },
1187
1187
  role: "listbox",
1188
1188
  children: /* @__PURE__ */ jsx297(context_default.Provider, { value: ctxValue, children: itemChildren })
1189
1189
  }
@@ -3416,7 +3416,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3416
3416
  }
3417
3417
  if (left < 8) left = 8;
3418
3418
  setPosition({
3419
- position: { top, left, width: triggerRect.width },
3419
+ position: { top, left },
3420
3420
  direction
3421
3421
  });
3422
3422
  }, [triggerRef, popRef]);
@@ -4222,7 +4222,7 @@ var SelectRoot = (props) => {
4222
4222
  {
4223
4223
  className: clsx_default("lib-xplat-select-content", position.direction, stateClass),
4224
4224
  ref: contentRef,
4225
- style: { ...position.position, minWidth: position.position.width },
4225
+ style: { ...position.position, width: triggerRef.current?.offsetWidth },
4226
4226
  role: "listbox",
4227
4227
  children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(context_default.Provider, { value: ctxValue, children: itemChildren })
4228
4228
  }
@@ -3328,7 +3328,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3328
3328
  }
3329
3329
  if (left < 8) left = 8;
3330
3330
  setPosition({
3331
- position: { top, left, width: triggerRect.width },
3331
+ position: { top, left },
3332
3332
  direction
3333
3333
  });
3334
3334
  }, [triggerRef, popRef]);
@@ -4134,7 +4134,7 @@ var SelectRoot = (props) => {
4134
4134
  {
4135
4135
  className: clsx_default("lib-xplat-select-content", position.direction, stateClass),
4136
4136
  ref: contentRef,
4137
- style: { ...position.position, minWidth: position.position.width },
4137
+ style: { ...position.position, width: triggerRef.current?.offsetWidth },
4138
4138
  role: "listbox",
4139
4139
  children: /* @__PURE__ */ jsx332(context_default.Provider, { value: ctxValue, children: itemChildren })
4140
4140
  }
package/dist/index.cjs CHANGED
@@ -7840,7 +7840,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7840
7840
  }
7841
7841
  if (left < 8) left = 8;
7842
7842
  setPosition({
7843
- position: { top, left, width: triggerRect.width },
7843
+ position: { top, left },
7844
7844
  direction
7845
7845
  });
7846
7846
  }, [triggerRef, popRef]);
@@ -8646,7 +8646,7 @@ var SelectRoot = (props) => {
8646
8646
  {
8647
8647
  className: clsx_default("lib-xplat-select-content", position.direction, stateClass),
8648
8648
  ref: contentRef,
8649
- style: { ...position.position, minWidth: position.position.width },
8649
+ style: { ...position.position, width: triggerRef.current?.offsetWidth },
8650
8650
  role: "listbox",
8651
8651
  children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(context_default.Provider, { value: ctxValue, children: itemChildren })
8652
8652
  }
package/dist/index.js CHANGED
@@ -7443,7 +7443,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7443
7443
  }
7444
7444
  if (left < 8) left = 8;
7445
7445
  setPosition({
7446
- position: { top, left, width: triggerRect.width },
7446
+ position: { top, left },
7447
7447
  direction
7448
7448
  });
7449
7449
  }, [triggerRef, popRef]);
@@ -8249,7 +8249,7 @@ var SelectRoot = (props) => {
8249
8249
  {
8250
8250
  className: clsx_default("lib-xplat-select-content", position.direction, stateClass),
8251
8251
  ref: contentRef,
8252
- style: { ...position.position, minWidth: position.position.width },
8252
+ style: { ...position.position, width: triggerRef.current?.offsetWidth },
8253
8253
  role: "listbox",
8254
8254
  children: /* @__PURE__ */ jsx332(context_default.Provider, { value: ctxValue, children: itemChildren })
8255
8255
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-plat/design-system",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "description": "XPLAT UI Design System",
5
5
  "author": "XPLAT WOONG",
6
6
  "main": "dist/index.cjs",