1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-30 22:01:44 +02:00
market/src/components/@shared/FormInput/InputElement.module.css

261 lines
5.3 KiB
CSS
Raw Normal View History

2020-05-19 10:57:49 +02:00
.input {
font-size: var(--font-size-base);
font-family: var(--font-family-base);
font-weight: var(--font-weight-bold);
color: var(--font-color-heading);
border: 1px solid var(--border-color);
2020-05-19 10:57:49 +02:00
box-shadow: none;
width: 100%;
2021-02-25 13:16:32 +01:00
background: var(--background-content);
padding: calc(var(--spacer) / 3);
2020-05-19 10:57:49 +02:00
margin: 0;
border-radius: var(--border-radius);
transition: 0.2s ease-out;
2020-10-16 09:00:16 +02:00
height: 43px;
min-width: 0;
2020-05-19 10:57:49 +02:00
appearance: none;
display: block;
2020-05-19 10:57:49 +02:00
}
.input:focus {
border-color: var(--font-color-text);
2020-05-19 10:57:49 +02:00
box-shadow: none;
outline: 0;
}
.input::placeholder {
font-family: var(--font-family-base);
font-size: var(--font-size-base);
Swap tokens (#204) * swap Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * validation and calculation Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactor Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove unused effect Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix interval Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * increase refresh timer, remove optional params Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * make inputs show up without wallet * style fixes * restyling * styling * more styling * fix refresh price Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove test effect * fixes, get data as early as possible from DDO and initial state * refactor * refactor * refactor * label tweaks * copy * typo * prototype output * remove price header * ouput swap fee * fix * spacing * copy * refactor pool transaction titles * copy * update math Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * use messaging tweaks * tab tweaks, output refactor * fix dark mode selection style * prototype output * method tweaks * slippage to 1%, added warnig banner Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * form tweaks * error fix * empty inputs by default * longer intervals * maxOcean validation fix * slippage tolerance UI * modified slippage UI * refactor, refresh ocean user balance * move typings/models around * typing fix * fixed output values Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * bump oceanlib Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove console.log * remove placeholder * tweak * non-web3 browser tweak Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-11-16 16:21:15 +01:00
color: var(--color-secondary);
2020-05-19 10:57:49 +02:00
font-weight: var(--font-weight-base);
transition: 0.2s ease-out;
opacity: 0.7;
}
.input[readonly],
.input[disabled] {
2020-11-05 21:49:31 +01:00
background-color: var(--background-highlight);
color: var(--brand-grey-light);
2020-05-19 10:57:49 +02:00
cursor: not-allowed;
pointer-events: none;
2020-09-21 15:28:13 +02:00
}
.input[readonly]::-webkit-inner-spin-button,
.input[disabled]::-webkit-inner-spin-button,
.input[readonly]::-webkit-outer-spin-button,
.input[disabled]::-webkit-outer-spin-button {
display: none;
2020-05-19 10:57:49 +02:00
}
2020-10-16 09:03:54 +02:00
.textarea {
composes: input;
height: auto;
}
2020-05-19 10:57:49 +02:00
.select {
composes: input;
height: 43px;
padding-right: 3rem;
/* custom arrow */
2020-05-19 10:57:49 +02:00
background-image: linear-gradient(
45deg,
transparent 50%,
var(--font-color-text) 50%
2020-05-19 10:57:49 +02:00
),
linear-gradient(135deg, var(--font-color-text) 50%, transparent 50%),
2020-05-19 10:57:49 +02:00
linear-gradient(
to right,
var(--border-color) 1px,
transparent 1px,
transparent
2020-05-19 10:57:49 +02:00
);
background-position: calc(100% - 18px) calc(1rem + 5px),
calc(100% - 13px) calc(1rem + 5px), 100% 0;
background-size: 5px 5px, 5px 5px, 2.5rem 3rem;
background-repeat: no-repeat;
}
2020-05-19 10:57:49 +02:00
.select:focus {
outline: 0;
font-family: var(--font-family-base);
}
Start compute job (#439) * Wip start compute job * Wip select algorithm design * Asset selection form component, for start compute job (#442) * prototype AssetSelection * assetselection styling * typing "fix" * put back file info icon * AssetSelection styling in context * update start job method, fixed algo select, and fixed option typing * compute logic update * add has previous orders for algo asset * fixed search algorithm assets in start compute form * fixed lint errors * updated previous order for algo logic and compute flow * update use price hook and added buy DT for algo * display only alg of type exchange and sort by value * display only trusted algo for asset if field is set * added logic for allow all published algorithms or no algorithms allowed * asset selection style & spacing tweaks * refactor get algorithms for compute and edit compute * fixed form options and more refactoring * new ButtonBuy component * shared component between consume/compute * dealing with various states: loading, previous orders, help text output * effect dependencies * move error output into toast * formik data flow refactor * ditch custom field change handler * fix initialValues * typed form data & validation * fixes multiple form validation issues along the way * isInitialValid → validateOnMount * metadata display tweaks * error feedback tweaks * oler assets checks, confeti on succes job, market fee on order, removed algo compute logic * more startJob logging * feedback & messaging changes * metadata display * return all algos, fixed & dynamic priced ones * fix DOM nesting * messaging updates * copy tweaks * check algorithm previous history for both acces and compute sercive types * handle start compute error * extra checks on start compute response * styling tweaks, fix toast UI errors * AssetSelection: empty screen, tweak min/max height * fix FRE issues on start compute * check is ordarable before start compute job * logging tweaks * disable eslint no-unused-vars rule for some Apollo code blocks * fix metadata editing for compute assets * consider dataset timeout for compute too Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-04-01 17:21:08 +02:00
.algorithmLabel {
display: grid;
gap: var(--spacer);
grid-template-columns: 2fr 1fr;
}
.prefixGroup,
.postfixGroup {
display: inline-flex;
align-items: center;
Swap tokens (#204) * swap Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * validation and calculation Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactor Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove unused effect Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix interval Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * increase refresh timer, remove optional params Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * make inputs show up without wallet * style fixes * restyling * styling * more styling * fix refresh price Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove test effect * fixes, get data as early as possible from DDO and initial state * refactor * refactor * refactor * label tweaks * copy * typo * prototype output * remove price header * ouput swap fee * fix * spacing * copy * refactor pool transaction titles * copy * update math Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * use messaging tweaks * tab tweaks, output refactor * fix dark mode selection style * prototype output * method tweaks * slippage to 1%, added warnig banner Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * form tweaks * error fix * empty inputs by default * longer intervals * maxOcean validation fix * slippage tolerance UI * modified slippage UI * refactor, refresh ocean user balance * move typings/models around * typing fix * fixed output values Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * bump oceanlib Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove console.log * remove placeholder * tweak * non-web3 browser tweak Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-11-16 16:21:15 +01:00
width: 100%;
}
.prefixGroup input {
border-left: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.postfixGroup input {
border-right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.prefix,
.postfix {
border: 1px solid var(--border-color);
2020-10-16 09:00:16 +02:00
height: 43px;
display: flex;
align-items: center;
padding-left: calc(var(--spacer) / 4);
padding-right: calc(var(--spacer) / 4);
2020-11-05 21:49:31 +01:00
color: var(--font-color-text);
font-size: var(--font-size-small);
transition: border 0.2s ease-out;
white-space: nowrap;
2020-10-16 09:00:16 +02:00
position: relative;
}
.prefix {
border-top-left-radius: var(--border-radius);
border-bottom-left-radius: var(--border-radius);
}
.postfix {
border-top-right-radius: var(--border-radius);
border-bottom-right-radius: var(--border-radius);
}
.input:focus + .postfix {
border-color: var(--brand-grey);
}
.input[type='range'] {
background: transparent;
appearance: none;
2020-10-14 19:54:36 +02:00
}
.input[type='range']:focus {
2020-10-14 19:54:36 +02:00
outline: none;
}
/* Selectors need to be split up to work in both engines */
.input[type='range']::-webkit-slider-thumb {
-webkit-appearance: none;
margin-top: -0.5rem;
background: var(--brand-gradient);
border: 2px solid var(--border-color);
width: var(--font-size-h4);
height: var(--font-size-h4);
border-radius: 50%;
cursor: pointer;
box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.2);
}
.input[type='range']::-moz-range-thumb {
2020-10-14 19:54:36 +02:00
background: var(--brand-gradient);
border: 2px solid var(--border-color);
2020-10-14 19:54:36 +02:00
width: var(--font-size-large);
height: var(--font-size-large);
border-radius: 50%;
cursor: pointer;
box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.2);
}
.input[type='range']::-webkit-slider-runnable-track {
margin-top: -1rem;
background: var(--border-color);
border-radius: var(--border-radius);
height: 0.3rem;
border: none;
}
.input[type='range']::-moz-range-track {
background: var(--border-color);
2020-10-14 19:54:36 +02:00
border-radius: var(--border-radius);
height: 0.3rem;
border: none;
}
/* Size modifiers */
Swap tokens (#204) * swap Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * validation and calculation Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactor Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove unused effect Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix interval Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * increase refresh timer, remove optional params Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * make inputs show up without wallet * style fixes * restyling * styling * more styling * fix refresh price Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove test effect * fixes, get data as early as possible from DDO and initial state * refactor * refactor * refactor * label tweaks * copy * typo * prototype output * remove price header * ouput swap fee * fix * spacing * copy * refactor pool transaction titles * copy * update math Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * use messaging tweaks * tab tweaks, output refactor * fix dark mode selection style * prototype output * method tweaks * slippage to 1%, added warnig banner Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * form tweaks * error fix * empty inputs by default * longer intervals * maxOcean validation fix * slippage tolerance UI * modified slippage UI * refactor, refresh ocean user balance * move typings/models around * typing fix * fixed output values Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * bump oceanlib Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove console.log * remove placeholder * tweak * non-web3 browser tweak Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-11-16 16:21:15 +01:00
.mini,
.select.mini {
font-size: var(--font-size-mini);
height: 24px;
padding: calc(var(--spacer) / 8);
}
.mini::placeholder {
font-size: var(--font-size-mini);
}
.prefix.mini,
.postfix.mini {
height: 24px;
font-size: var(--font-size-mini);
}
.select.mini {
padding-right: 2rem;
/* custom arrow */
background-position: calc(100% - 14px) 0.6rem, calc(100% - 9px) 0.6rem, 100% 0;
background-size: 5px 5px, 5px 5px, 1.75rem 3rem;
}
2020-10-31 00:55:00 +01:00
.small,
.select.small {
2020-05-19 10:57:49 +02:00
font-size: var(--font-size-small);
height: 34px;
padding: calc(var(--spacer) / 4);
2020-05-19 10:57:49 +02:00
}
.small::placeholder {
2020-05-19 10:57:49 +02:00
font-size: var(--font-size-small);
}
2020-09-16 15:55:40 +02:00
.prefix.small,
.postfix.small {
height: 34px;
2020-09-16 15:55:40 +02:00
font-size: var(--font-size-mini);
}
2020-10-31 00:55:00 +01:00
.select.small {
padding-right: 2rem;
/* custom arrow */
background-position: calc(100% - 14px) 1rem, calc(100% - 9px) 1rem, 100% 0;
background-size: 5px 5px, 5px 5px, 2rem 3rem;
}
.large,
.select.large {
font-size: var(--font-size-large);
height: 62px;
padding: calc(var(--spacer) / 1.5);
}
.large::placeholder {
font-size: var(--font-size-large);
}
.prefix.large,
.postfix.large {
height: 62px;
font-size: var(--font-size-base);
}
.select.large {
2020-05-19 10:57:49 +02:00
padding-right: 2rem;
/* custom arrow */
2020-05-19 10:57:49 +02:00
background-position: calc(100% - 14px) 1rem, calc(100% - 9px) 1rem, 100% 0;
background-size: 5px 5px, 5px 5px, 2rem 3rem;
}