@sia.soul/sia-react-ui 0.1.149 → 0.1.151

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.
@@ -305,9 +305,10 @@ function Floating({
305
305
  const leaveTimer = useRef3();
306
306
  const contentId = useId2();
307
307
  const triggers = Array.isArray(trigger) ? trigger : [trigger];
308
+ const hasContent = content !== null && content !== void 0 && typeof content !== "boolean" && !(typeof content === "string" && content.trim() === "");
308
309
  const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
309
310
  const [position, setPosition] = useState();
310
- const motion = useOverlayMotion(!!visible, overlayRef, "tooltip", "bottom", !!position, void 0, !overlayClassName.includes("sia-form-item__error-popover"));
311
+ const motion = useOverlayMotion(!!visible && hasContent, overlayRef, "tooltip", "bottom", !!position, void 0, !overlayClassName.includes("sia-form-item__error-popover"));
311
312
  const [portalContainer, setPortalContainer] = useState(null);
312
313
  useLayoutEffect(() => {
313
314
  if (!motion.present) return;
@@ -319,6 +320,7 @@ function Floating({
319
320
  if (!closeSelfRef.current) closeSelfRef.current = () => setVisibleRef.current(false);
320
321
  const exclusiveTooltip = role === "tooltip" && triggers.includes("hover");
321
322
  function openNow() {
323
+ if (!hasContent) return;
322
324
  if (exclusiveTooltip && activeTooltipClose !== closeSelfRef.current) {
323
325
  activeTooltipClose?.();
324
326
  activeTooltipClose = closeSelfRef.current;
@@ -431,7 +433,7 @@ function Floating({
431
433
  } } : {},
432
434
  "aria-describedby": visible ? contentId : void 0
433
435
  });
434
- const overlay = motion.present && content !== null && content !== void 0 && typeof document !== "undefined" ? createPortal(
436
+ const overlay = motion.present && hasContent && typeof document !== "undefined" ? createPortal(
435
437
  /* @__PURE__ */ jsxs2(
436
438
  "span",
437
439
  {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Popover,
3
3
  Tooltip
4
- } from "./chunk-HRC6TQTZ.js";
4
+ } from "./chunk-5P274RXG.js";
5
5
  import {
6
6
  Dropdown
7
7
  } from "./chunk-J4R734AI.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Select
3
- } from "./chunk-HRC6TQTZ.js";
3
+ } from "./chunk-5P274RXG.js";
4
4
  import {
5
5
  Icon
6
6
  } from "./chunk-SCVUD2IJ.js";
package/dist/core.cjs CHANGED
@@ -4006,9 +4006,10 @@ function Floating({
4006
4006
  const leaveTimer = (0, import_react21.useRef)();
4007
4007
  const contentId = (0, import_react21.useId)();
4008
4008
  const triggers = Array.isArray(trigger) ? trigger : [trigger];
4009
+ const hasContent = content !== null && content !== void 0 && typeof content !== "boolean" && !(typeof content === "string" && content.trim() === "");
4009
4010
  const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
4010
4011
  const [position, setPosition] = (0, import_react21.useState)();
4011
- const motion = useOverlayMotion(!!visible, overlayRef, "tooltip", "bottom", !!position, void 0, !overlayClassName.includes("sia-form-item__error-popover"));
4012
+ const motion = useOverlayMotion(!!visible && hasContent, overlayRef, "tooltip", "bottom", !!position, void 0, !overlayClassName.includes("sia-form-item__error-popover"));
4012
4013
  const [portalContainer, setPortalContainer] = (0, import_react21.useState)(null);
4013
4014
  (0, import_react21.useLayoutEffect)(() => {
4014
4015
  if (!motion.present) return;
@@ -4020,6 +4021,7 @@ function Floating({
4020
4021
  if (!closeSelfRef.current) closeSelfRef.current = () => setVisibleRef.current(false);
4021
4022
  const exclusiveTooltip = role === "tooltip" && triggers.includes("hover");
4022
4023
  function openNow() {
4024
+ if (!hasContent) return;
4023
4025
  if (exclusiveTooltip && activeTooltipClose !== closeSelfRef.current) {
4024
4026
  activeTooltipClose?.();
4025
4027
  activeTooltipClose = closeSelfRef.current;
@@ -4132,7 +4134,7 @@ function Floating({
4132
4134
  } } : {},
4133
4135
  "aria-describedby": visible ? contentId : void 0
4134
4136
  });
4135
- const overlay = motion.present && content !== null && content !== void 0 && typeof document !== "undefined" ? (0, import_react_dom3.createPortal)(
4137
+ const overlay = motion.present && hasContent && typeof document !== "undefined" ? (0, import_react_dom3.createPortal)(
4136
4138
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4137
4139
  "span",
4138
4140
  {
package/dist/core.css CHANGED
@@ -3914,14 +3914,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3914
3914
  text-overflow: ellipsis;
3915
3915
  white-space: nowrap;
3916
3916
  }
3917
- .sia-table__cell--ellipsis > .sia-table__cell-content :is(.sia-space, .sia-flex, [data-table-inline-layout]) {
3917
+ .sia-table__cell--ellipsis > .sia-table__cell-content:not(:has(> .sia-table__editor)) :is(.sia-space, .sia-flex, [data-table-inline-layout]) {
3918
3918
  display: inline-flex;
3919
3919
  width: max-content;
3920
3920
  flex-wrap: nowrap !important;
3921
3921
  flex-direction: row !important;
3922
3922
  vertical-align: middle;
3923
3923
  }
3924
- .sia-table__cell--ellipsis > .sia-table__cell-content :is(.sia-space, .sia-flex, [data-table-inline-layout]) > * {
3924
+ .sia-table__cell--ellipsis > .sia-table__cell-content:not(:has(> .sia-table__editor)) :is(.sia-space, .sia-flex, [data-table-inline-layout]) > * {
3925
3925
  flex-shrink: 0;
3926
3926
  width: auto;
3927
3927
  flex-direction: row;
@@ -4397,6 +4397,39 @@ fieldset:disabled .sia-input-number__floating-placeholder {
4397
4397
  .sia-table__editor > .sia-select > .sia-select__trigger:focus-visible {
4398
4398
  outline: none;
4399
4399
  }
4400
+ .sia-table__editor--custom {
4401
+ min-width: 0;
4402
+ overflow: auto;
4403
+ box-sizing: border-box;
4404
+ }
4405
+ .sia-table__editor--custom:has(> .sia-flex) {
4406
+ padding: 4px 8px;
4407
+ }
4408
+ .sia-table__editor--custom > .sia-flex {
4409
+ min-width: 0;
4410
+ min-height: min-content;
4411
+ height: auto;
4412
+ flex: 1;
4413
+ white-space: normal;
4414
+ }
4415
+ .sia-table__editor--custom .sia-flex {
4416
+ min-width: 0;
4417
+ }
4418
+ .sia-table__editor--custom .sia-flex > .sia-select {
4419
+ width: 100%;
4420
+ min-width: 0;
4421
+ flex-shrink: 0;
4422
+ }
4423
+ .sia-table__editor--custom .sia-flex .sia-select__trigger {
4424
+ height: var(--sia-control-height);
4425
+ border-radius: var(--sia-radius);
4426
+ }
4427
+ .sia-table__editor--custom .sia-flex .sia-select--small > .sia-select__trigger {
4428
+ height: var(--sia-control-height-small);
4429
+ }
4430
+ .sia-table__editor--custom .sia-flex .sia-select--large > .sia-select__trigger {
4431
+ height: var(--sia-control-height-large);
4432
+ }
4400
4433
  .sia-table__tree-cell {
4401
4434
  display: flex;
4402
4435
  align-items: center;
package/dist/core.js CHANGED
@@ -11,11 +11,11 @@ import {
11
11
  Typography,
12
12
  Upload,
13
13
  message
14
- } from "./chunk-G5YXOCSY.js";
14
+ } from "./chunk-GA5HA2A4.js";
15
15
  import "./chunk-RX242MUO.js";
16
16
  import {
17
17
  Select
18
- } from "./chunk-HRC6TQTZ.js";
18
+ } from "./chunk-5P274RXG.js";
19
19
  import {
20
20
  Input,
21
21
  Segmented
package/dist/game.css CHANGED
@@ -3965,14 +3965,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3965
3965
  text-overflow: ellipsis;
3966
3966
  white-space: nowrap;
3967
3967
  }
3968
- .sia-table__cell--ellipsis > .sia-table__cell-content :is(.sia-space, .sia-flex, [data-table-inline-layout]) {
3968
+ .sia-table__cell--ellipsis > .sia-table__cell-content:not(:has(> .sia-table__editor)) :is(.sia-space, .sia-flex, [data-table-inline-layout]) {
3969
3969
  display: inline-flex;
3970
3970
  width: max-content;
3971
3971
  flex-wrap: nowrap !important;
3972
3972
  flex-direction: row !important;
3973
3973
  vertical-align: middle;
3974
3974
  }
3975
- .sia-table__cell--ellipsis > .sia-table__cell-content :is(.sia-space, .sia-flex, [data-table-inline-layout]) > * {
3975
+ .sia-table__cell--ellipsis > .sia-table__cell-content:not(:has(> .sia-table__editor)) :is(.sia-space, .sia-flex, [data-table-inline-layout]) > * {
3976
3976
  flex-shrink: 0;
3977
3977
  width: auto;
3978
3978
  flex-direction: row;
@@ -4448,6 +4448,39 @@ fieldset:disabled .sia-input-number__floating-placeholder {
4448
4448
  .sia-table__editor > .sia-select > .sia-select__trigger:focus-visible {
4449
4449
  outline: none;
4450
4450
  }
4451
+ .sia-table__editor--custom {
4452
+ min-width: 0;
4453
+ overflow: auto;
4454
+ box-sizing: border-box;
4455
+ }
4456
+ .sia-table__editor--custom:has(> .sia-flex) {
4457
+ padding: 4px 8px;
4458
+ }
4459
+ .sia-table__editor--custom > .sia-flex {
4460
+ min-width: 0;
4461
+ min-height: min-content;
4462
+ height: auto;
4463
+ flex: 1;
4464
+ white-space: normal;
4465
+ }
4466
+ .sia-table__editor--custom .sia-flex {
4467
+ min-width: 0;
4468
+ }
4469
+ .sia-table__editor--custom .sia-flex > .sia-select {
4470
+ width: 100%;
4471
+ min-width: 0;
4472
+ flex-shrink: 0;
4473
+ }
4474
+ .sia-table__editor--custom .sia-flex .sia-select__trigger {
4475
+ height: var(--sia-control-height);
4476
+ border-radius: var(--sia-radius);
4477
+ }
4478
+ .sia-table__editor--custom .sia-flex .sia-select--small > .sia-select__trigger {
4479
+ height: var(--sia-control-height-small);
4480
+ }
4481
+ .sia-table__editor--custom .sia-flex .sia-select--large > .sia-select__trigger {
4482
+ height: var(--sia-control-height-large);
4483
+ }
4451
4484
  .sia-table__tree-cell {
4452
4485
  display: flex;
4453
4486
  align-items: center;