-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move search input components to their own folders
- Loading branch information
1 parent
f7a820f
commit 9d2f5f5
Showing
10 changed files
with
354 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/app-explorer/src/systems/Core/components/Search/SearchInput/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const DEFAULT_SEARCH_INPUT_WIDTH = 400; |
1 change: 1 addition & 0 deletions
1
packages/app-explorer/src/systems/Core/components/Search/SearchInput/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './SearchInput'; |
28 changes: 28 additions & 0 deletions
28
packages/app-explorer/src/systems/Core/components/Search/SearchInput/styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { tv } from 'tailwind-variants'; | ||
|
||
export const styles = tv({ | ||
slots: { | ||
searchBox: [ | ||
'transition-all duration-200 [&[data-active=false]]:ease-in [&[data-active=true]]:ease-out', | ||
'group justify-center items-center', | ||
'block left-0 w-full', // needed for properly execution of transitions | ||
'[&[data-active=true]]:w-[calc(100vw+1px)] [&[data-active=true]]:left-[-64px] tablet:[&[data-active=true]]:w-full', | ||
'[&[data-active=true]]:absolute tablet:[&[data-active=true]]:left-0 [&[data-active=true]]:right-0', | ||
'[&[data-active=true]]:top-[-14px] tablet:[&[data-active=true]]:top-[-4px] desktop:[&[data-active=true]]:top-[-20px]', | ||
'[&[data-active=true]]:z-50', | ||
], | ||
inputContainer: 'w-full', | ||
inputWrapper: [ | ||
'outline-none h-[40px] group-[&[data-active=true]]:h-[60px] tablet:group-[&[data-active=true]]:h-[40px]', | ||
'group-[&[data-active=true]]:rounded-none tablet:group-[&[data-active=true]]:rounded-[var(--text-field-border-radius)] ', | ||
'border-x-[1px] border-y-[1px] group-[&[data-active=true]]:border-x-0 group-[&[data-active=true]]:border-y-0 tablet:group-[&[data-active=true]]:border-x-[1px] tablet:group-[&[data-active=true]]:border-y-[1px]', | ||
'border-[var(--color-border)] shadow-none', | ||
'bg-none dark:bg-[var(--color-surface)] group-[&[data-active=true]]:bg-[var(--color-panel-solid)]', | ||
'[&_.rt-TextFieldChrome]:bg-gray-1 [&_.rt-TextFieldChrome]:outline-none', | ||
'[&_.rt-TextFieldChrome]:[&[data-opened=true]]:rounded-b-none', | ||
'group-[&[data-active=true]]:[&_.rt-TextFieldChrome]:shadow-none', | ||
], | ||
inputActionsContainer: | ||
'[&[data-show=false]]:hidden absolute flex items-center h-full right-0 top-0 transform', | ||
}, | ||
}); |
Oops, something went wrong.