|
| 1 | +/* The wrapper class is applied alongside FormRoot's styled-components class. |
| 2 | + The .wrapper.wrapper double-class boost matches the specificity behavior of |
| 3 | + the original `styled(FormRoot)` chain so these overrides reliably beat |
| 4 | + FormRoot's `align-items: flex-start` regardless of stylesheet insertion |
| 5 | + order between CSS Modules and the runtime-injected styled-components. */ |
| 6 | +.wrapper.wrapper { |
| 7 | + /* stylelint-disable-next-line plugin/no-unsupported-browser-features -- `fit-content` |
| 8 | + keyword on `max-width` is widely supported on evergreen browsers; the original |
| 9 | + styled-components rule used the same value. */ |
| 10 | + max-width: fit-content; |
| 11 | + align-items: center; |
| 12 | +} |
| 13 | + |
| 14 | +.checkinput { |
| 15 | + display: flex; |
| 16 | + width: var(--click-checkbox-size-all); |
| 17 | + height: var(--click-checkbox-size-all); |
| 18 | + flex-shrink: 0; |
| 19 | + justify-content: center; |
| 20 | + align-items: center; |
| 21 | + border: 1px solid var(--checkbox-stroke-default); |
| 22 | + border-radius: var(--click-checkbox-radii-all); |
| 23 | + background: var(--checkbox-bg-default); |
| 24 | + cursor: pointer; |
| 25 | +} |
| 26 | + |
| 27 | +.checkinput_variant_default { |
| 28 | + --checkbox-bg-default: var(--click-checkbox-color-variations-default-background-default); |
| 29 | + --checkbox-bg-hover: var(--click-checkbox-color-variations-default-background-hover); |
| 30 | + --checkbox-bg-active: var(--click-checkbox-color-variations-default-background-active); |
| 31 | + --checkbox-stroke-default: var(--click-checkbox-color-variations-default-stroke-default); |
| 32 | + --checkbox-stroke-active: var(--click-checkbox-color-variations-default-stroke-active); |
| 33 | +} |
| 34 | + |
| 35 | +.checkinput_variant_var1 { |
| 36 | + --checkbox-bg-default: var(--click-checkbox-color-variations-var1-background-default); |
| 37 | + --checkbox-bg-hover: var(--click-checkbox-color-variations-var1-background-hover); |
| 38 | + --checkbox-bg-active: var(--click-checkbox-color-variations-var1-background-active); |
| 39 | + --checkbox-stroke-default: var(--click-checkbox-color-variations-var1-stroke-default); |
| 40 | + --checkbox-stroke-active: var(--click-checkbox-color-variations-var1-stroke-active); |
| 41 | +} |
| 42 | + |
| 43 | +.checkinput_variant_var2 { |
| 44 | + --checkbox-bg-default: var(--click-checkbox-color-variations-var2-background-default); |
| 45 | + --checkbox-bg-hover: var(--click-checkbox-color-variations-var2-background-hover); |
| 46 | + --checkbox-bg-active: var(--click-checkbox-color-variations-var2-background-active); |
| 47 | + --checkbox-stroke-default: var(--click-checkbox-color-variations-var2-stroke-default); |
| 48 | + --checkbox-stroke-active: var(--click-checkbox-color-variations-var2-stroke-active); |
| 49 | +} |
| 50 | + |
| 51 | +.checkinput_variant_var3 { |
| 52 | + --checkbox-bg-default: var(--click-checkbox-color-variations-var3-background-default); |
| 53 | + --checkbox-bg-hover: var(--click-checkbox-color-variations-var3-background-hover); |
| 54 | + --checkbox-bg-active: var(--click-checkbox-color-variations-var3-background-active); |
| 55 | + --checkbox-stroke-default: var(--click-checkbox-color-variations-var3-stroke-default); |
| 56 | + --checkbox-stroke-active: var(--click-checkbox-color-variations-var3-stroke-active); |
| 57 | +} |
| 58 | + |
| 59 | +.checkinput_variant_var4 { |
| 60 | + --checkbox-bg-default: var(--click-checkbox-color-variations-var4-background-default); |
| 61 | + --checkbox-bg-hover: var(--click-checkbox-color-variations-var4-background-hover); |
| 62 | + --checkbox-bg-active: var(--click-checkbox-color-variations-var4-background-active); |
| 63 | + --checkbox-stroke-default: var(--click-checkbox-color-variations-var4-stroke-default); |
| 64 | + --checkbox-stroke-active: var(--click-checkbox-color-variations-var4-stroke-active); |
| 65 | +} |
| 66 | + |
| 67 | +.checkinput_variant_var5 { |
| 68 | + --checkbox-bg-default: var(--click-checkbox-color-variations-var5-background-default); |
| 69 | + --checkbox-bg-hover: var(--click-checkbox-color-variations-var5-background-hover); |
| 70 | + --checkbox-bg-active: var(--click-checkbox-color-variations-var5-background-active); |
| 71 | + --checkbox-stroke-default: var(--click-checkbox-color-variations-var5-stroke-default); |
| 72 | + --checkbox-stroke-active: var(--click-checkbox-color-variations-var5-stroke-active); |
| 73 | +} |
| 74 | + |
| 75 | +.checkinput_variant_var6 { |
| 76 | + --checkbox-bg-default: var(--click-checkbox-color-variations-var6-background-default); |
| 77 | + --checkbox-bg-hover: var(--click-checkbox-color-variations-var6-background-hover); |
| 78 | + --checkbox-bg-active: var(--click-checkbox-color-variations-var6-background-active); |
| 79 | + --checkbox-stroke-default: var(--click-checkbox-color-variations-var6-stroke-default); |
| 80 | + --checkbox-stroke-active: var(--click-checkbox-color-variations-var6-stroke-active); |
| 81 | +} |
| 82 | + |
| 83 | +.checkinput:hover { |
| 84 | + background: var(--checkbox-bg-hover); |
| 85 | +} |
| 86 | + |
| 87 | +.checkinput[data-state='checked'], |
| 88 | +.checkinput[data-state='indeterminate'] { |
| 89 | + border-color: var(--checkbox-stroke-active); |
| 90 | + background: var(--checkbox-bg-active); |
| 91 | +} |
| 92 | + |
| 93 | +/* stylelint-disable no-descending-specificity -- disabled state intentionally |
| 94 | + defined after checked/indeterminate to mirror the source cascade order; |
| 95 | + matches the styled-components rule which used a nested `&[data-disabled]` |
| 96 | + block placed after the state selectors. */ |
| 97 | +.checkinput[data-disabled] { |
| 98 | + border-color: var(--click-checkbox-color-stroke-disabled); |
| 99 | + background: var(--click-checkbox-color-background-disabled); |
| 100 | + cursor: not-allowed; |
| 101 | +} |
| 102 | + |
| 103 | +.checkinput[data-disabled][data-state='checked'], |
| 104 | +.checkinput[data-disabled][data-state='indeterminate'] { |
| 105 | + border-color: var(--click-checkbox-color-stroke-disabled); |
| 106 | + background: var(--click-checkbox-color-background-disabled); |
| 107 | +} |
| 108 | +/* stylelint-enable no-descending-specificity */ |
| 109 | + |
| 110 | +.checkicon { |
| 111 | + color: var(--click-checkbox-color-check-active); |
| 112 | +} |
| 113 | + |
| 114 | +.checkicon[data-disabled] { |
| 115 | + color: var(--click-checkbox-color-check-disabled); |
| 116 | +} |
0 commit comments