index.less 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. .node-render {
  6. background: #fff;
  7. border: 1px solid rgba(6, 7, 9, 0.15);
  8. display: flex;
  9. flex-direction: column;
  10. justify-content: center;
  11. position: relative;
  12. cursor: pointer;
  13. padding: 16px;
  14. background-color: #ffffff;
  15. border-radius: 8px;
  16. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  17. width: auto;
  18. min-width: 200px;
  19. // Activated state - when node is selected/focused
  20. &-activated {
  21. border-color: #82a7fc;
  22. }
  23. // Dragging state - when node is being dragged
  24. &-dragging {
  25. opacity: 0.3;
  26. }
  27. // Block icon states - when showing order or regular block icons
  28. &-block-icon,
  29. &-block-order-icon {
  30. width: 260px;
  31. }
  32. // Hover effects for better UX
  33. &:hover {
  34. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  35. }
  36. // Focus state for accessibility
  37. &:focus-within {
  38. outline: 2px solid #82a7fc;
  39. outline-offset: 2px;
  40. }
  41. .node-form {
  42. transition: opacity 1s ease-in-out;
  43. }
  44. }
  45. .node-render-before-render {
  46. max-height: 1px;
  47. .node-form {
  48. opacity: 0;
  49. }
  50. }
  51. .node-render-rendered {
  52. max-height: 1px;
  53. animation: node-rendered-transition 1s ease-out forwards;
  54. .node-form {
  55. opacity: 1;
  56. }
  57. }
  58. @keyframes node-rendered-transition {
  59. 0% {
  60. max-height: 1px;
  61. }
  62. 100% {
  63. max-height: 500px;
  64. }
  65. }
  66. .node-render-removed {
  67. max-height: 500px;
  68. animation: node-removed-transition 0.3s ease-out forwards;
  69. overflow: hidden;
  70. padding: 0 16px;
  71. transition: opacity 0.3s ease-out;
  72. opacity: 0;
  73. }
  74. @keyframes node-removed-transition {
  75. 0% {
  76. max-height: 500px;
  77. padding: 16px;
  78. }
  79. 100% {
  80. max-height: 1px;
  81. padding: 0 16px;
  82. }
  83. }
  84. .node-render-border-transition {
  85. outline: 2px solid transparent;
  86. animation: node-border-appear-hide 0.8s ease-in-out forwards;
  87. }
  88. @keyframes node-border-appear-hide {
  89. 0% {
  90. outline: 2px solid transparent;
  91. }
  92. 50% {
  93. outline: 2px solid #82a7fc;
  94. }
  95. 100% {
  96. outline: 2px solid transparent;
  97. }
  98. }