prefix classes

pull/5370/head
filip mertens 3 years ago
parent c7b2c586ad
commit 945f35e602
  1. 2
      libs/remix-ui/search/src/lib/components/Exclude.tsx
  2. 6
      libs/remix-ui/search/src/lib/components/Find.tsx
  3. 2
      libs/remix-ui/search/src/lib/components/Include.tsx
  4. 2
      libs/remix-ui/search/src/lib/components/OverWriteCheck.tsx
  5. 2
      libs/remix-ui/search/src/lib/components/Replace.tsx
  6. 2
      libs/remix-ui/search/src/lib/components/Search.tsx
  7. 4
      libs/remix-ui/search/src/lib/components/results/ResultFileName.tsx
  8. 8
      libs/remix-ui/search/src/lib/components/results/ResultItem.tsx
  9. 14
      libs/remix-ui/search/src/lib/components/results/ResultSummary.tsx
  10. 2
      libs/remix-ui/search/src/lib/components/results/Results.tsx
  11. 38
      libs/remix-ui/search/src/lib/search.css

@ -17,7 +17,7 @@ export const Exclude = props => {
return ( return (
<> <>
<div className="find-part"> <div className="search_plugin_find-part">
<label>exclude</label> <label>exclude</label>
<input <input
id='search_exclude' id='search_exclude'

@ -17,16 +17,16 @@ export const Find = props => {
return ( return (
<> <>
<div className="find-part"> <div className="search_plugin_find-part">
<label>search</label> <label>search</label>
<div className="search-input"> <div className="search_plugin_search-input">
<input <input
id='search_input' id='search_input'
placeholder="Search" placeholder="Search"
className="form-control" className="form-control"
onChange={change} onChange={change}
></input> ></input>
<div className="controls"> <div className="search_plugin_controls">
<div <div
data-id='search_case_sensitive' data-id='search_case_sensitive'
title="Match Case" title="Match Case"

@ -13,7 +13,7 @@ export const Include = props => {
return ( return (
<> <>
<div className="find-part"> <div className="search_plugin_find-part">
<label>include</label> <label>include</label>
<input <input
id='search_include' id='search_include'

@ -10,7 +10,7 @@ export const OverWriteCheck = props => {
return ( return (
<> <>
<div className="find-part"> <div className="search_plugin_find-part">
<div className="mb-2 remixui_nightlyBuilds custom-control custom-checkbox"> <div className="mb-2 remixui_nightlyBuilds custom-control custom-checkbox">
<input <input
className="mr-2 custom-control-input" className="mr-2 custom-control-input"

@ -11,7 +11,7 @@ export const Replace = props => {
return ( return (
<> <>
<div className="find-part"> <div className="search_plugin_find-part">
<label>replace</label> <label>replace</label>
<input <input
id='search_replace' id='search_replace'

@ -14,7 +14,7 @@ const plugin = props.plugin
return ( return (
<> <>
<div className="search_tab pl-2 pr-2"> <div className="search_plugin_search_tab pl-2 pr-2">
<SearchProvider plugin={plugin}> <SearchProvider plugin={plugin}>
<Find></Find> <Find></Find>
<Replace></Replace> <Replace></Replace>

@ -18,9 +18,9 @@ export const ResultFileName = (props: ResultItemProps) => {
return ( return (
<> <>
{icon ? <div className={`${icon} caret caret_tv`}></div> : null} {icon ? <div className={`${icon} caret caret_tv`}></div> : null}
<div title={props.file.filename} className="search_file_name ml-2"> <div title={props.file.filename} className="search_plugin_search_file_name ml-2">
{path.basename(props.file.path)} {path.basename(props.file.path)}
<span className='dirname pl-1 text-muted text-lowercase'>{path.dirname(props.file.path)}</span> <span className='pl-1 text-muted text-lowercase'>{path.dirname(props.file.path)}</span>
</div> </div>
</> </>
) )

@ -66,7 +66,7 @@ export const ResultItem = (props: ResultItemProps) => {
<> <>
{lines && lines.length ? ( {lines && lines.length ? (
<> <>
<div onClick={toggleClass} className="search_result_item_title"> <div onClick={toggleClass} className="search_plugin_search_result_item_title">
<button className="btn"> <button className="btn">
<i <i
className={`fas ${ className={`fas ${
@ -76,15 +76,15 @@ export const ResultItem = (props: ResultItemProps) => {
></i> ></i>
</button>{' '} </button>{' '}
<ResultFileName file={props.file} /> <ResultFileName file={props.file} />
<div className="result_count"> <div className="search_plugin_result_count">
<div className="result_count_number badge badge-pill badge-secondary"> <div className="search_plugin_result_count_number badge badge-pill badge-secondary">
{props.file.count} {props.file.count}
</div> </div>
</div> </div>
</div> </div>
{loading ? <div className="loading">Loading...</div> : null} {loading ? <div className="loading">Loading...</div> : null}
{!toggleExpander && !loading ? ( {!toggleExpander && !loading ? (
<div className="p-1 wrap_summary"> <div className="p-1 search_plugin_wrap_summary">
{lines.map((line, index) => ( {lines.map((line, index) => (
<ResultSummary <ResultSummary
setLoading={setLoading} setLoading={setLoading}

@ -37,21 +37,21 @@ export const ResultSummary = (props: ResultSummaryProps) => {
return ( return (
<> <>
{props.line.lines.map((lineItem, index) => ( {props.line.lines.map((lineItem, index) => (
<div className='search_line_container' key={index}> <div className='search_plugin_search_line_container' key={index}>
<div <div
onClick={async () => { onClick={async () => {
selectLine(lineItem) selectLine(lineItem)
}} }}
data-id={`${props.searchResult.filename}-${lineItem.position.start.line}-${lineItem.position.start.column}`} data-id={`${props.searchResult.filename}-${lineItem.position.start.line}-${lineItem.position.start.column}`}
key={props.searchResult.filename} key={props.searchResult.filename}
className='search_line pb-1' className='search_plugin_search_line pb-1'
> >
<div className='summary_left'>{lineItem.left.substring(lineItem.left.length - 20).trimStart()}</div> <div className='search_plugin_summary_left'>{lineItem.left.substring(lineItem.left.length - 20).trimStart()}</div>
<mark className={`summary_center ${state.replace? 'replace_strike':''}`}>{lineItem.center}</mark> <mark className={`search_plugin_summary_center ${state.replace? 'search_plugin_replace_strike':''}`}>{lineItem.center}</mark>
{state.replace? <mark className='replacement'>{state.replace}</mark>:<></>} {state.replace? <mark className='search_plugin_replacement'>{state.replace}</mark>:<></>}
<div className='summary_right'>{lineItem.right.substring(0, 100)}</div> <div className='search_plugin_summary_right'>{lineItem.right.substring(0, 100)}</div>
</div> </div>
<div className='search_control'> <div className='search_plugin_search_control'>
<div title="Replace" data-id={`replace-${props.searchResult.filename}-${lineItem.position.start.line}-${lineItem.position.start.column}`} onClick={async () => { <div title="Replace" data-id={`replace-${props.searchResult.filename}-${lineItem.position.start.line}-${lineItem.position.start.column}`} onClick={async () => {
replace(lineItem) replace(lineItem)
}} className="codicon codicon-find-replace" role="button" aria-label="Replace" aria-disabled="false"></div> }} className="codicon codicon-find-replace" role="button" aria-label="Replace" aria-disabled="false"></div>

@ -6,7 +6,7 @@ export const Results = () => {
const { state } = useContext(SearchContext) const { state } = useContext(SearchContext)
return ( return (
<div data-id='search_results'> <div data-id='search_results'>
{state.find ? <div className='result_count_number badge badge-pill badge-secondary'>{state.count} results</div>: null} {state.find ? <div className='search_plugin_result_count_number badge badge-pill badge-secondary'>{state.count} results</div>: null}
{state.count < state.maxResults && state.searchResults && {state.count < state.maxResults && state.searchResults &&
state.searchResults.map((result, index) => { state.searchResults.map((result, index) => {
return <ResultItem key={index} file={result} /> return <ResultItem key={index} file={result} />

@ -1,4 +1,4 @@
.search_result_item_title { .search_plugin_search_result_item_title {
display: flex; display: flex;
-webkit-user-select: none; /* Safari */ -webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */ -moz-user-select: none; /* Firefox */
@ -8,7 +8,7 @@
align-items: center; align-items: center;
} }
.wrap_summary { .search_plugin_wrap_summary {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
-webkit-user-select: none; /* Safari */ -webkit-user-select: none; /* Safari */
@ -18,89 +18,89 @@
cursor: pointer; cursor: pointer;
} }
.find-part { .search_plugin_find-part {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 2px; padding: 2px;
} }
.controls { .search_plugin_controls {
display: flex; display: flex;
} }
.search_tab .search_line_container { .search_plugin_search_tab .search_plugin_search_line_container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
position: relative; position: relative;
} }
.search_tab .search_line { .search_plugin_search_tab .search_plugin_search_line {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
} }
.search_tab .search_control { .search_plugin_search_tab .search_plugin_search_control {
flex-grow: 0; flex-grow: 0;
position: absolute; position: absolute;
right: 0px; right: 0px;
top: 0px; top: 0px;
} }
.summary_right { .search_plugin_summary_right {
min-width: 0; min-width: 0;
white-space: pre; white-space: pre;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.search_tab .replace_strike { .search_plugin_search_tab .search_plugin_replace_strike {
text-decoration: line-through; text-decoration: line-through;
} }
.summary_left { .search_plugin_summary_left {
white-space: pre; white-space: pre;
} }
.search_tab mark { .search_plugin_search_tab mark {
padding: 0; padding: 0;
} }
.search_tab .search_line_container .search_control { .search_plugin_search_tab .search_plugin_search_line_container .search_plugin_search_control {
display: none; display: none;
} }
.search_tab .search_line_container:hover .search_control { .search_plugin_search_tab .search_plugin_search_line_container:hover .search_plugin_search_control {
display: block; display: block;
} }
.search_tab .search_line_container:hover .search_line { .search_plugin_search_tab .search_plugin_search_line_container:hover .search_plugin_search_line {
width: 93%; width: 93%;
} }
.search-input { .search_plugin_search-input {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.search_tab .checked { .search_plugin_search_tab .checked {
background-color: var(--secondary); background-color: var(--secondary);
} }
.search_tab .search_file_name { .search_plugin_search_tab .search_plugin_search_file_name {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
text-transform: uppercase; text-transform: uppercase;
} }
.search_tab .result_count { .search_plugin_search_tab .search_plugin_result_count {
flex-grow: 1; flex-grow: 1;
text-align: right; text-align: right;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.search_tab .result_count_number { .search_plugin_search_tab .search_plugin_result_count_number {
font-size: x-small; font-size: x-small;
} }
Loading…
Cancel
Save