Krish2606 commited on
Commit
cd3aae2
·
1 Parent(s): 40f8ac1

Implement animated expandable search bar on mobile focus

Browse files
frontend/css/styles.css CHANGED
@@ -4929,4 +4929,41 @@ tr:hover td {
4929
  .step-connector {
4930
  display: none;
4931
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4932
  }
 
4929
  .step-connector {
4930
  display: none;
4931
  }
4932
+ }
4933
+
4934
+ /* ============================================================================
4935
+ Expandable Search Input
4936
+ ============================================================================ */
4937
+ .search-input-wrapper {
4938
+ position: relative;
4939
+ display: flex;
4940
+ align-items: center;
4941
+ width: 100%;
4942
+ max-width: 400px;
4943
+ transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4944
+ }
4945
+
4946
+ .search-input-wrapper i.fa-search {
4947
+ position: absolute;
4948
+ left: 12px;
4949
+ color: var(--gray-400);
4950
+ font-size: 0.875rem;
4951
+ pointer-events: none;
4952
+ }
4953
+
4954
+ .search-expandable {
4955
+ width: 100%;
4956
+ padding-left: 36px !important;
4957
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4958
+ }
4959
+
4960
+ @media (max-width: 768px) {
4961
+ .search-input-wrapper {
4962
+ max-width: 140px;
4963
+ }
4964
+
4965
+ .search-input-wrapper:focus-within {
4966
+ max-width: 100% !important;
4967
+ flex: 1 0 auto;
4968
+ }
4969
  }
frontend/js/pages/agents.js CHANGED
@@ -50,8 +50,11 @@ const AgentsPage = {
50
  </div>
51
 
52
  <div class="card mb-4">
53
- <div class="flex items-center gap-4" style="flex-wrap:wrap;">
54
- <input type="text" class="form-input" id="search-agents" placeholder="Search agents..." style="max-width: 220px;">
 
 
 
55
 
56
  <div class="flex items-center gap-2">
57
  <i class="fas fa-filter" style="color: var(--gray-400); font-size: 0.875rem;"></i>
 
50
  </div>
51
 
52
  <div class="card mb-4">
53
+ <div class="flex items-center gap-4" style="flex-wrap: wrap;">
54
+ <div class="search-input-wrapper">
55
+ <i class="fas fa-search"></i>
56
+ <input type="text" class="form-input search-expandable" id="search-agents" placeholder="Search agents...">
57
+ </div>
58
 
59
  <div class="flex items-center gap-2">
60
  <i class="fas fa-filter" style="color: var(--gray-400); font-size: 0.875rem;"></i>
frontend/js/pages/conversations.js CHANGED
@@ -16,17 +16,17 @@ const ConversationsPage = {
16
  </div>
17
 
18
  <div class="card mb-4">
19
- <div class="flex items-center gap-4">
20
- <div class="search-input-wrapper" style="flex: 1; max-width: 400px; position: relative;">
21
- <i class="fas fa-search" style="position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 0.875rem;"></i>
22
- <input type="text" class="form-input" id="search-conversations" placeholder="Search conversations..." style="padding-left: 36px;">
23
  </div>
24
- <select class="form-select" id="filter-status" style="width: auto;">
25
  <option value="all">All Status</option>
26
  <option value="active">Active</option>
27
  <option value="completed">Completed</option>
28
  </select>
29
- <select class="form-select" id="filter-agent" style="width: auto;">
30
  <option value="all">All Agents</option>
31
  </select>
32
  </div>
 
16
  </div>
17
 
18
  <div class="card mb-4">
19
+ <div class="flex items-center gap-4" style="flex-wrap: wrap;">
20
+ <div class="search-input-wrapper">
21
+ <i class="fas fa-search"></i>
22
+ <input type="text" class="form-input search-expandable" id="search-conversations" placeholder="Search conversations...">
23
  </div>
24
+ <select class="form-select" id="filter-status" style="width: auto; flex-shrink: 0;">
25
  <option value="all">All Status</option>
26
  <option value="active">Active</option>
27
  <option value="completed">Completed</option>
28
  </select>
29
+ <select class="form-select" id="filter-agent" style="width: auto; flex-shrink: 0;">
30
  <option value="all">All Agents</option>
31
  </select>
32
  </div>
frontend/js/pages/reports.js CHANGED
@@ -16,12 +16,12 @@ const ReportsPage = {
16
  </div>
17
 
18
  <div class="card mb-4">
19
- <div class="flex items-center gap-4">
20
- <div class="search-input-wrapper" style="flex: 1; max-width: 400px; position: relative;">
21
- <i class="fas fa-search" style="position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 0.875rem;"></i>
22
- <input type="text" class="form-input" id="search-reports" placeholder="Search reports..." style="padding-left: 36px;">
23
  </div>
24
- <select class="form-select" id="filter-agent" style="width: auto;">
25
  <option value="all">All Agents</option>
26
  </select>
27
  </div>
 
16
  </div>
17
 
18
  <div class="card mb-4">
19
+ <div class="flex items-center gap-4" style="flex-wrap: wrap;">
20
+ <div class="search-input-wrapper">
21
+ <i class="fas fa-search"></i>
22
+ <input type="text" class="form-input search-expandable" id="search-reports" placeholder="Search reports...">
23
  </div>
24
+ <select class="form-select" id="filter-agent" style="width: auto; flex-shrink: 0;">
25
  <option value="all">All Agents</option>
26
  </select>
27
  </div>