funda-ui 4.7.625 → 4.7.701

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.
Files changed (84) hide show
  1. package/CascadingSelect/index.js +2 -2
  2. package/CascadingSelectE2E/index.js +2 -2
  3. package/Chatbox/index.js +3 -17
  4. package/Checkbox/index.js +3 -3
  5. package/ColorPicker/index.js +3 -18
  6. package/Date/index.js +3 -18
  7. package/EventCalendarTimeline/index.d.ts +1 -1
  8. package/EventCalendarTimeline/index.js +11 -1
  9. package/File/index.d.ts +9 -0
  10. package/File/index.js +245 -93
  11. package/Input/index.js +3 -18
  12. package/LiveSearch/index.js +3 -18
  13. package/NativeSelect/index.js +3 -3
  14. package/NumberInput/index.js +3 -18
  15. package/Popover/index.css +198 -0
  16. package/Popover/index.d.ts +4 -0
  17. package/Popover/index.js +1808 -0
  18. package/README.md +1 -0
  19. package/Radio/index.js +3 -3
  20. package/RangeSlider/index.js +3 -18
  21. package/SearchBar/index.js +3 -18
  22. package/Select/index.js +3 -2
  23. package/Switch/index.js +3 -3
  24. package/TagInput/index.css +31 -31
  25. package/TagInput/index.js +12 -23
  26. package/Textarea/index.js +3 -17
  27. package/Utils/useSSE.d.ts +9 -0
  28. package/Utils/useSSE.js +211 -0
  29. package/all.d.ts +1 -0
  30. package/all.js +1 -0
  31. package/lib/cjs/CascadingSelect/index.js +2 -2
  32. package/lib/cjs/CascadingSelectE2E/index.js +2 -2
  33. package/lib/cjs/Chatbox/index.js +3 -17
  34. package/lib/cjs/Checkbox/index.js +3 -3
  35. package/lib/cjs/ColorPicker/index.js +3 -18
  36. package/lib/cjs/Date/index.js +3 -18
  37. package/lib/cjs/EventCalendarTimeline/index.d.ts +1 -1
  38. package/lib/cjs/EventCalendarTimeline/index.js +11 -1
  39. package/lib/cjs/File/index.d.ts +9 -0
  40. package/lib/cjs/File/index.js +245 -93
  41. package/lib/cjs/Input/index.js +3 -18
  42. package/lib/cjs/LiveSearch/index.js +3 -18
  43. package/lib/cjs/NativeSelect/index.js +3 -3
  44. package/lib/cjs/NumberInput/index.js +3 -18
  45. package/lib/cjs/Popover/index.d.ts +4 -0
  46. package/lib/cjs/Popover/index.js +1808 -0
  47. package/lib/cjs/Radio/index.js +3 -3
  48. package/lib/cjs/RangeSlider/index.js +3 -18
  49. package/lib/cjs/SearchBar/index.js +3 -18
  50. package/lib/cjs/Select/index.js +3 -2
  51. package/lib/cjs/Switch/index.js +3 -3
  52. package/lib/cjs/TagInput/index.js +12 -23
  53. package/lib/cjs/Textarea/index.js +3 -17
  54. package/lib/cjs/Utils/useSSE.d.ts +9 -0
  55. package/lib/cjs/Utils/useSSE.js +211 -0
  56. package/lib/cjs/index.d.ts +1 -0
  57. package/lib/cjs/index.js +1 -0
  58. package/lib/css/Popover/index.css +198 -0
  59. package/lib/css/TagInput/index.css +31 -31
  60. package/lib/esm/CascadingSelect/index.tsx +2 -2
  61. package/lib/esm/CascadingSelectE2E/index.tsx +2 -2
  62. package/lib/esm/Checkbox/index.tsx +3 -3
  63. package/lib/esm/ColorPicker/index.tsx +4 -15
  64. package/lib/esm/EventCalendarTimeline/index.tsx +11 -2
  65. package/lib/esm/File/index.tsx +148 -23
  66. package/lib/esm/Input/index.tsx +6 -17
  67. package/lib/esm/NativeSelect/index.tsx +3 -3
  68. package/lib/esm/NumberInput/index.tsx +7 -15
  69. package/lib/esm/Popover/Popover.tsx +251 -0
  70. package/lib/esm/Popover/PopoverClose.tsx +51 -0
  71. package/lib/esm/Popover/PopoverContent.tsx +72 -0
  72. package/lib/esm/Popover/PopoverTrigger.tsx +62 -0
  73. package/lib/esm/Popover/index.scss +272 -0
  74. package/lib/esm/Popover/index.tsx +4 -0
  75. package/lib/esm/Radio/index.tsx +3 -3
  76. package/lib/esm/SearchBar/index.tsx +8 -12
  77. package/lib/esm/Select/index.tsx +2 -2
  78. package/lib/esm/Switch/index.tsx +3 -3
  79. package/lib/esm/TagInput/index.scss +24 -24
  80. package/lib/esm/TagInput/index.tsx +13 -20
  81. package/lib/esm/Textarea/index.tsx +6 -14
  82. package/lib/esm/Utils/hooks/useSSE.tsx +109 -0
  83. package/lib/esm/index.js +1 -0
  84. package/package.json +1 -1
@@ -0,0 +1,198 @@
1
+ /* ======================================================
2
+ <!-- Popover -->
3
+ /* ====================================================== */
4
+ /*
5
+ * 1. Base Styles
6
+ * 2. Position Modifiers - Top
7
+ * 3. Position Modifiers - Top Left
8
+ * 4. Position Modifiers - Top Right
9
+ * 5. Position Modifiers - Bottom
10
+ * 6. Position Modifiers - Bottom Left
11
+ * 7. Position Modifiers - Bottom Right
12
+ * 8. Position Modifiers - Left
13
+ * 9. Position Modifiers - Right
14
+ * 10. Size
15
+ */
16
+ .cus-popover__wrapper {
17
+ --cus-popover-box-shadow: 0 5px 15px 0 rgba(0,0,0,.07), 0 15px 35px 0 rgba(50,50,93,.1);
18
+ --cus-popover-content-bg: rgba(17, 17, 17, 0.9);
19
+ --cus-popover-content-color: #fff;
20
+ --cus-popover-content-font-size: 0.75em;
21
+ --cus-popover-content-padding-x: 1em;
22
+ --cus-popover-content-padding-y: .5em;
23
+ --cus-popover-content-line-height: 1.5;
24
+ --cus-popover-arrow-bg-top: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
25
+ --cus-popover-arrow-bg-bottom: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
26
+ --cus-popover-arrow-bg-left: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
27
+ --cus-popover-arrow-bg-right: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
28
+ --cus-popover-arrow-width: 18px;
29
+ --cus-popover-arrow-height: 6px;
30
+ position: absolute;
31
+ z-index: 1055; /* --bs-modal-zindex */
32
+ pointer-events: none;
33
+ display: none;
34
+ margin-top: -0.2rem;
35
+ /*
36
+ ---------------------------
37
+ 1. Base Styles
38
+ ---------------------------
39
+ */
40
+ /*
41
+ ---------------------------
42
+ 2. Position Modifiers - Top
43
+ ---------------------------
44
+ */
45
+ /*
46
+ ---------------------------
47
+ 3. Position Modifiers - Top Left
48
+ ---------------------------
49
+ */
50
+ /*
51
+ ---------------------------
52
+ 4. Position Modifiers - Top Right
53
+ ---------------------------
54
+ */
55
+ /*
56
+ ---------------------------
57
+ 5. Position Modifiers - Bottom
58
+ ---------------------------
59
+ */
60
+ /*
61
+ ---------------------------
62
+ 6. Position Modifiers - Bottom Left
63
+ ---------------------------
64
+ */
65
+ /*
66
+ ---------------------------
67
+ 7. Position Modifiers - Bottom Right
68
+ ---------------------------
69
+ */
70
+ /*
71
+ ---------------------------
72
+ 10. Size
73
+ ---------------------------
74
+ */
75
+ }
76
+ .cus-popover__wrapper::before {
77
+ background-size: 100% auto !important;
78
+ content: "";
79
+ position: absolute;
80
+ }
81
+ .cus-popover__wrapper.active {
82
+ display: block !important;
83
+ }
84
+ .cus-popover__wrapper.active::before,
85
+ .cus-popover__wrapper.active > .cus-popover__content {
86
+ opacity: 1;
87
+ }
88
+ .cus-popover__wrapper:focus::before,
89
+ .cus-popover__wrapper:focus > .cus-popover__content {
90
+ opacity: 1;
91
+ }
92
+ .cus-popover__wrapper::before,
93
+ .cus-popover__wrapper > .cus-popover__content {
94
+ backface-visibility: hidden;
95
+ will-change: transform;
96
+ opacity: 0;
97
+ box-sizing: border-box;
98
+ z-index: 10;
99
+ transform-origin: top;
100
+ box-shadow: var(--cus-popover-box-shadow);
101
+ transition: none !important; /* Don't use transition if position is outside window */
102
+ }
103
+ .cus-popover__wrapper > .cus-popover__content {
104
+ pointer-events: auto;
105
+ background: var(--cus-popover-content-bg);
106
+ border-radius: 4px;
107
+ color: var(--cus-popover-content-color);
108
+ content: attr(aria-label);
109
+ font-size: var(--cus-popover-content-font-size);
110
+ font-weight: normal;
111
+ text-transform: none;
112
+ padding: var(--cus-popover-content-padding-y) var(--cus-popover-content-padding-x);
113
+ white-space: nowrap;
114
+ box-sizing: content-box;
115
+ line-height: var(--cus-popover-content-line-height);
116
+ }
117
+ .cus-popover__wrapper > .cus-popover__content img {
118
+ height: auto !important;
119
+ margin: 0.5rem 0;
120
+ }
121
+ .cus-popover__wrapper[data-microtip-position|=top]::before {
122
+ background: var(--cus-popover-arrow-bg-top);
123
+ height: var(--cus-popover-arrow-height);
124
+ width: var(--cus-popover-arrow-width);
125
+ }
126
+ .cus-popover__wrapper[data-microtip-position|=top] > .cus-popover__content {
127
+ margin-bottom: var(--cus-popover-arrow-height);
128
+ }
129
+ .cus-popover__wrapper[data-microtip-position|=top]::before {
130
+ top: calc(100% - var(--cus-popover-arrow-height));
131
+ left: calc(var(--cus-popover-arrow-width) / 2 * -1);
132
+ }
133
+ .cus-popover__wrapper[data-microtip-position|=top] > .cus-popover__content {
134
+ bottom: calc(100% + var(--cus-popover-arrow-height));
135
+ left: 50%;
136
+ transform: translateX(-50%);
137
+ }
138
+ .cus-popover__wrapper[data-microtip-position=top-left] > .cus-popover__content {
139
+ bottom: calc(100% + var(--cus-popover-arrow-height));
140
+ left: 50%;
141
+ transform: translateX(calc(-100% + var(--cus-popover-arrow-width)));
142
+ }
143
+ .cus-popover__wrapper[data-microtip-position=top-right] > .cus-popover__content {
144
+ bottom: calc(100% + var(--cus-popover-arrow-height));
145
+ left: 50%;
146
+ transform: translateX(calc(0% - var(--cus-popover-arrow-width)));
147
+ }
148
+ .cus-popover__wrapper[data-microtip-position|=bottom]::before {
149
+ background: var(--cus-popover-arrow-bg-bottom);
150
+ height: var(--cus-popover-arrow-height);
151
+ width: var(--cus-popover-arrow-width);
152
+ margin-top: 5px;
153
+ margin-bottom: 0;
154
+ }
155
+ .cus-popover__wrapper[data-microtip-position|=bottom] > .cus-popover__content {
156
+ margin-top: var(--cus-popover-arrow-height);
157
+ }
158
+ .cus-popover__wrapper[data-microtip-position|=bottom]::before {
159
+ bottom: calc(100% - var(--cus-popover-arrow-height));
160
+ left: calc(var(--cus-popover-arrow-width) / 2 * -1);
161
+ }
162
+ .cus-popover__wrapper[data-microtip-position|=bottom] > .cus-popover__content {
163
+ bottom: auto;
164
+ top: calc(100% + var(--cus-popover-arrow-height));
165
+ left: 50%;
166
+ transform: translateX(-50%);
167
+ }
168
+ .cus-popover__wrapper[data-microtip-position=bottom-left] > .cus-popover__content {
169
+ bottom: auto;
170
+ top: calc(100% + var(--cus-popover-arrow-height));
171
+ left: 50%;
172
+ transform: translateX(calc(-100% + var(--cus-popover-arrow-width)));
173
+ }
174
+ .cus-popover__wrapper[data-microtip-position=bottom-right] > .cus-popover__content {
175
+ bottom: auto;
176
+ top: calc(100% + var(--cus-popover-arrow-height));
177
+ left: 50%;
178
+ transform: translateX(calc(0% - var(--cus-popover-arrow-width)));
179
+ }
180
+ .cus-popover__wrapper[data-microtip-size=auto].cus-popover__content {
181
+ white-space: nowrap;
182
+ width: auto;
183
+ max-width: 530px;
184
+ overflow: hidden;
185
+ text-overflow: ellipsis;
186
+ }
187
+ .cus-popover__wrapper[data-microtip-size=small].cus-popover__content {
188
+ white-space: initial;
189
+ width: 80px;
190
+ }
191
+ .cus-popover__wrapper[data-microtip-size=medium].cus-popover__content {
192
+ white-space: initial;
193
+ width: 150px;
194
+ }
195
+ .cus-popover__wrapper[data-microtip-size=large].cus-popover__content {
196
+ white-space: initial;
197
+ width: 260px;
198
+ }
@@ -1,46 +1,46 @@
1
1
  /* ======================================================
2
2
  <!-- Tag Input -->
3
3
  /* ====================================================== */
4
- .tag-input__wrapper {
5
- --tag-input-control-border-radius: 0.375rem;
6
- --tag-input-control-wrapper-bg: #fff;
7
- --tag-input-control-wrapper-border-color: #dee2e6;
8
- --tag-input-control-color: #adb5bd;
9
- --tag-input-list-bg: #efefef;
10
- --tag-input-removebtn-fill: #000;
11
- --tag-input-removebtn-hover-fill: #f00;
12
- --tag-input-focus-border-color:#86b7fe;
13
- --tag-input-focus-box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
4
+ .taginput__wrapper {
5
+ --taginput-control-border-radius: 0.375rem;
6
+ --taginput-control-wrapper-bg: #fff;
7
+ --taginput-control-wrapper-border-color: #dee2e6;
8
+ --taginput-control-color: #adb5bd;
9
+ --taginput-list-bg: #efefef;
10
+ --taginput-removebtn-fill: #000;
11
+ --taginput-removebtn-hover-fill: #f00;
12
+ --taginput-focus-border-color:#86b7fe;
13
+ --taginput-focus-box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
14
14
  display: flex;
15
15
  }
16
- .tag-input__wrapper ul,
17
- .tag-input__wrapper li {
16
+ .taginput__wrapper ul,
17
+ .taginput__wrapper li {
18
18
  padding: 0;
19
19
  margin: 0;
20
20
  list-style: none;
21
21
  }
22
- .tag-input__wrapper .tag-input__control-wrapper {
22
+ .taginput__wrapper .taginput__control-wrapper {
23
23
  display: flex;
24
24
  }
25
- .tag-input__wrapper .tag-input__control-wrapper > div {
25
+ .taginput__wrapper .taginput__control-wrapper > div {
26
26
  position: relative;
27
27
  align-items: center;
28
28
  display: flex;
29
29
  flex-wrap: wrap;
30
30
  /* bootstrap style that match ".form-control" */
31
31
  padding: 0.375rem;
32
- background-color: var(--tag-input-control-wrapper-bg);
32
+ background-color: var(--taginput-control-wrapper-bg);
33
33
  background-clip: padding-box;
34
- border: 1px solid var(--tag-input-control-wrapper-border-color);
34
+ border: 1px solid var(--taginput-control-wrapper-border-color);
35
35
  appearance: none;
36
- border-radius: var(--tag-input-control-border-radius);
36
+ border-radius: var(--taginput-control-border-radius);
37
37
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
38
38
  padding-bottom: 1px;
39
39
  }
40
- .tag-input__wrapper .tag-input__control-wrapper > div .tag-input__control {
40
+ .taginput__wrapper .taginput__control-wrapper > div .taginput__control {
41
41
  margin-bottom: 0.375rem;
42
42
  }
43
- .tag-input__wrapper .tag-input__control-wrapper > div .tag-input__control input {
43
+ .taginput__wrapper .taginput__control-wrapper > div .taginput__control input {
44
44
  background: transparent;
45
45
  border: none;
46
46
  outline: none;
@@ -51,25 +51,25 @@
51
51
  font-size: 0.875rem;
52
52
  font-weight: 400;
53
53
  line-height: 1.5;
54
- color: var(--tag-input-control-color);
54
+ color: var(--taginput-control-color);
55
55
  }
56
- .tag-input__wrapper .tag-input__control-wrapper > div .tag-input__control input:focus {
56
+ .taginput__wrapper .taginput__control-wrapper > div .taginput__control input:focus {
57
57
  outline: none;
58
58
  box-shadow: none;
59
59
  }
60
- .tag-input__wrapper ul.tag-input__list li {
60
+ .taginput__wrapper ul.taginput__list li {
61
61
  display: inline-block;
62
62
  margin: 5px;
63
63
  margin-bottom: 0;
64
64
  padding: 0.1rem 1.5rem 0.1rem 1rem;
65
65
  font-size: 0.875rem;
66
- background: var(--tag-input-list-bg);
66
+ background: var(--taginput-list-bg);
67
67
  border-radius: 30px;
68
68
  overflow: hidden;
69
69
  text-overflow: ellipsis;
70
70
  position: relative;
71
71
  }
72
- .tag-input__wrapper ul.tag-input__list li > a {
72
+ .taginput__wrapper ul.taginput__list li > a {
73
73
  font-weight: 400;
74
74
  opacity: 0.6;
75
75
  font-size: 18px;
@@ -79,13 +79,13 @@
79
79
  top: 50%;
80
80
  transform: translateY(-50%);
81
81
  }
82
- .tag-input__wrapper ul.tag-input__list li > a path {
83
- fill: var(--tag-input-removebtn-fill);
82
+ .taginput__wrapper ul.taginput__list li > a path {
83
+ fill: var(--taginput-removebtn-fill);
84
84
  }
85
- .tag-input__wrapper ul.tag-input__list li > a:hover path {
86
- fill: var(--tag-input-removebtn-hover-fill);
85
+ .taginput__wrapper ul.taginput__list li > a:hover path {
86
+ fill: var(--taginput-removebtn-hover-fill);
87
87
  }
88
- .tag-input__wrapper.focus .tag-input__control-wrapper > div {
89
- box-shadow: var(--tag-input-focus-box-shadow);
90
- border-color: var(--tag-input-focus-border-color);
88
+ .taginput__wrapper.focus-floating .taginput__control-wrapper > div {
89
+ box-shadow: var(--taginput-focus-box-shadow);
90
+ border-color: var(--taginput-focus-border-color);
91
91
  }
@@ -499,7 +499,7 @@ const CascadingSelect = forwardRef((props: CascadingSelectProps, externalRef: an
499
499
 
500
500
 
501
501
  function handleFocus(event: any) {
502
- rootRef.current?.classList.add('focus');
502
+ rootRef.current?.classList.add('focus-floating');
503
503
 
504
504
  //
505
505
  handleDisplayOptions(null);
@@ -513,7 +513,7 @@ const CascadingSelect = forwardRef((props: CascadingSelectProps, externalRef: an
513
513
 
514
514
  //----
515
515
  //remove focus style
516
- rootRef.current?.classList.remove('focus');
516
+ rootRef.current?.classList.remove('focus-floating');
517
517
 
518
518
 
519
519
  //
@@ -630,7 +630,7 @@ const CascadingSelectE2E = forwardRef((props: CascadingSelectE2EProps, externalR
630
630
 
631
631
 
632
632
  function handleFocus(event: any) {
633
- rootRef.current?.classList.add('focus');
633
+ rootRef.current?.classList.add('focus-floating');
634
634
 
635
635
  //
636
636
  handleDisplayOptions(null);
@@ -644,7 +644,7 @@ const CascadingSelectE2E = forwardRef((props: CascadingSelectE2EProps, externalR
644
644
 
645
645
  //----
646
646
  //remove focus style
647
- rootRef.current?.classList.remove('focus');
647
+ rootRef.current?.classList.remove('focus-floating');
648
648
 
649
649
 
650
650
  //
@@ -93,7 +93,7 @@ const Checkbox = forwardRef((props: CheckboxProps, externalRef: any) => {
93
93
 
94
94
 
95
95
  function handleFocus(event: any) {
96
- rootRef.current?.classList.add('focus');
96
+ rootRef.current?.classList.add('focus-floating');
97
97
 
98
98
  //
99
99
  onFocus?.(event);
@@ -107,7 +107,7 @@ const Checkbox = forwardRef((props: CheckboxProps, externalRef: any) => {
107
107
 
108
108
  //----
109
109
  //remove focus style
110
- rootRef.current?.classList.remove('focus');
110
+ rootRef.current?.classList.remove('focus-floating');
111
111
 
112
112
  //
113
113
  if (typeof (onChange) === 'function') {
@@ -123,7 +123,7 @@ const Checkbox = forwardRef((props: CheckboxProps, externalRef: any) => {
123
123
 
124
124
  //----
125
125
  //remove focus style
126
- rootRef.current?.classList.remove('focus');
126
+ rootRef.current?.classList.remove('focus-floating');
127
127
 
128
128
  //
129
129
  onBlur?.(event);
@@ -79,7 +79,6 @@ const ColorPicker = forwardRef((props: ColorPickerProps, externalRef: any) => {
79
79
 
80
80
 
81
81
  function handleFocus(event: FocusEvent<HTMLInputElement>) {
82
- rootRef.current?.classList.add('focus');
83
82
 
84
83
  //
85
84
  onFocus?.(event);
@@ -91,12 +90,6 @@ const ColorPicker = forwardRef((props: ColorPickerProps, externalRef: any) => {
91
90
  setChangedVal(val);
92
91
 
93
92
 
94
- //----
95
- //remove focus style
96
- if (val === '') {
97
- rootRef.current?.classList.remove('focus');
98
- }
99
-
100
93
  //
101
94
  onChange?.(event);
102
95
 
@@ -106,13 +99,6 @@ const ColorPicker = forwardRef((props: ColorPickerProps, externalRef: any) => {
106
99
  const el = event.target;
107
100
  const val = event.target.value;
108
101
 
109
-
110
- //----
111
- //remove focus style
112
- if (val === '') {
113
- rootRef.current?.classList.remove('focus');
114
- }
115
-
116
102
  //
117
103
  onBlur?.(event);
118
104
  }
@@ -133,7 +119,10 @@ const ColorPicker = forwardRef((props: ColorPickerProps, externalRef: any) => {
133
119
  <div className={combinedCls(
134
120
  'custom-colorpicker__wrapper',
135
121
  shapeClassName,
136
- clsWrite(wrapperClassName, 'mb-3 position-relative')
122
+ clsWrite(wrapperClassName, 'mb-3 position-relative'),
123
+ {
124
+ 'focus-floating': changedVal !== ''
125
+ }
137
126
  )} ref={rootRef}>
138
127
  {label ? <>{typeof label === 'string' ? <label htmlFor={idRes} className="form-label" dangerouslySetInnerHTML={{ __html: `${label}` }}></label> : <label htmlFor={idRes} className="form-label">{label}</label>}</> : null}
139
128
 
@@ -115,7 +115,7 @@ export type EventCalendarTimelineProps = {
115
115
 
116
116
  // table
117
117
  tableListSectionTitle?: string | React.ReactNode;
118
- tableCellMinWidth?: number;
118
+ tableCellMinWidth?: number | ((mode: 'week' | 'month') => number);
119
119
 
120
120
  // tooltip
121
121
  tableTooltipDirection?: string;
@@ -274,7 +274,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
274
274
  const AUTO_SCROLL = autoScroll || false;
275
275
  const SHOW_WEEK = showWeek || false;
276
276
  const BODY_DRAG = draggable || false;
277
- const CELL_MIN_W = typeof tableCellMinWidth === 'undefined' ? (SHOW_WEEK ? 100 : 50) : tableCellMinWidth;
278
277
  const tableGridRef = useRef<any>(null);
279
278
  const tableGridHeaderRef = useRef<any>(null);
280
279
  const scrollHeaderRef = useRef(null);
@@ -301,6 +300,16 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
301
300
  // appearance mode
302
301
  const [appearanceMode, setAppearanceMode] = useState<string>(appearance);
303
302
 
303
+ // Calculate CELL_MIN_W based on appearanceMode and tableCellMinWidth
304
+ const CELL_MIN_W = useMemo(() => {
305
+ if (typeof tableCellMinWidth === 'undefined') {
306
+ return appearanceMode === 'week' ? 100 : 50;
307
+ }
308
+ if (typeof tableCellMinWidth === 'function') {
309
+ return tableCellMinWidth(appearanceMode as 'week' | 'month');
310
+ }
311
+ return tableCellMinWidth;
312
+ }, [tableCellMinWidth, appearanceMode]);
304
313
 
305
314
  const findMondayAndTruncate = (dates: string[]) => {
306
315
  const _res = dates.map((s: string) => new Date(s));