@pareto-engineering/design-system 4.0.0-alpha.62 → 4.0.0-alpha.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/cjs/f/common/Description/Description.js +6 -5
  2. package/dist/cjs/f/common/Label/Label.js +9 -22
  3. package/dist/cjs/f/common/Label/styles.scss +0 -5
  4. package/dist/cjs/f/common/index.js +1 -9
  5. package/dist/cjs/f/fields/Checkbox/Checkbox.js +16 -21
  6. package/dist/cjs/f/fields/Checkbox/styles.scss +7 -5
  7. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +13 -23
  8. package/dist/cjs/f/fields/ChoicesInput/styles.scss +44 -41
  9. package/dist/cjs/f/fields/EditorInput/EditorInput.js +11 -39
  10. package/dist/cjs/f/fields/EditorInput/styles.scss +92 -90
  11. package/dist/cjs/f/fields/LinkInput/LinkInput.js +14 -20
  12. package/dist/cjs/f/fields/LinkInput/styles.scss +52 -51
  13. package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +2 -26
  14. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +4 -30
  15. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +7 -16
  16. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +9 -17
  17. package/dist/cjs/f/fields/QueryCombobox/styles.scss +38 -37
  18. package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +2 -10
  19. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +14 -38
  20. package/dist/cjs/f/fields/RatingsInput/styles.scss +5 -1
  21. package/dist/cjs/f/fields/SelectInput/SelectInput.js +14 -36
  22. package/dist/cjs/f/fields/SelectInput/styles.scss +5 -2
  23. package/dist/cjs/f/fields/TextInput/TextInput.js +19 -37
  24. package/dist/cjs/f/fields/TextInput/styles.scss +37 -30
  25. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -37
  26. package/dist/cjs/f/fields/TextareaInput/styles.scss +30 -27
  27. package/dist/es/f/common/Description/Description.js +4 -1
  28. package/dist/es/f/common/Label/Label.js +15 -24
  29. package/dist/es/f/common/Label/styles.scss +0 -5
  30. package/dist/es/f/common/index.js +0 -1
  31. package/dist/es/f/fields/Checkbox/Checkbox.js +14 -19
  32. package/dist/es/f/fields/Checkbox/styles.scss +7 -5
  33. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +31 -39
  34. package/dist/es/f/fields/ChoicesInput/styles.scss +44 -41
  35. package/dist/es/f/fields/EditorInput/EditorInput.js +12 -35
  36. package/dist/es/f/fields/EditorInput/styles.scss +92 -90
  37. package/dist/es/f/fields/LinkInput/LinkInput.js +14 -20
  38. package/dist/es/f/fields/LinkInput/styles.scss +52 -51
  39. package/dist/es/f/fields/QueryChoices/QueryChoices.js +2 -26
  40. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +4 -26
  41. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +8 -17
  42. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +10 -18
  43. package/dist/es/f/fields/QueryCombobox/styles.scss +38 -37
  44. package/dist/es/f/fields/QuerySelect/QuerySelect.js +2 -10
  45. package/dist/es/f/fields/RatingsInput/RatingsInput.js +15 -35
  46. package/dist/es/f/fields/RatingsInput/styles.scss +5 -1
  47. package/dist/es/f/fields/SelectInput/SelectInput.js +14 -36
  48. package/dist/es/f/fields/SelectInput/styles.scss +5 -2
  49. package/dist/es/f/fields/TextInput/TextInput.js +19 -37
  50. package/dist/es/f/fields/TextInput/styles.scss +37 -30
  51. package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -37
  52. package/dist/es/f/fields/TextareaInput/styles.scss +30 -27
  53. package/package.json +3 -3
  54. package/src/stories/f/Checkbox.stories.jsx +13 -21
  55. package/src/stories/f/ChoicesInput.stories.jsx +12 -27
  56. package/src/stories/f/EditorInput.stories.jsx +7 -14
  57. package/src/stories/f/LinkInput.stories.jsx +15 -22
  58. package/src/stories/f/QueryChoices.stories.jsx +12 -19
  59. package/src/stories/f/QueryCombobox.stories.jsx +16 -24
  60. package/src/stories/f/QuerySelect.stories.jsx +12 -19
  61. package/src/stories/f/RatingsInput.stories.jsx +7 -14
  62. package/src/stories/f/SelectInput.stories.jsx +12 -19
  63. package/src/stories/f/TextInput.stories.jsx +16 -23
  64. package/src/stories/f/TextareaInput.stories.jsx +7 -14
  65. package/src/ui/f/common/Description/Description.jsx +6 -2
  66. package/src/ui/f/common/Label/Label.jsx +27 -37
  67. package/src/ui/f/common/Label/styles.scss +0 -5
  68. package/src/ui/f/common/index.js +0 -1
  69. package/src/ui/f/fields/Checkbox/Checkbox.jsx +27 -33
  70. package/src/ui/f/fields/Checkbox/styles.scss +7 -5
  71. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +29 -38
  72. package/src/ui/f/fields/ChoicesInput/styles.scss +44 -41
  73. package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -41
  74. package/src/ui/f/fields/EditorInput/styles.scss +92 -90
  75. package/src/ui/f/fields/LinkInput/LinkInput.jsx +38 -45
  76. package/src/ui/f/fields/LinkInput/styles.scss +52 -51
  77. package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +0 -28
  78. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +5 -31
  79. package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +35 -46
  80. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +63 -73
  81. package/src/ui/f/fields/QueryCombobox/styles.scss +38 -37
  82. package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +0 -8
  83. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +20 -47
  84. package/src/ui/f/fields/RatingsInput/styles.scss +5 -1
  85. package/src/ui/f/fields/SelectInput/SelectInput.jsx +33 -61
  86. package/src/ui/f/fields/SelectInput/styles.scss +5 -2
  87. package/src/ui/f/fields/TextInput/TextInput.jsx +27 -50
  88. package/src/ui/f/fields/TextInput/styles.scss +37 -30
  89. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +32 -59
  90. package/src/ui/f/fields/TextareaInput/styles.scss +30 -27
  91. package/tests/__snapshots__/Storyshots.test.js.snap +5909 -0
  92. package/dist/cjs/f/common/InputWrapper/InputWrapper.js +0 -73
  93. package/dist/cjs/f/common/InputWrapper/index.js +0 -13
  94. package/dist/cjs/f/common/InputWrapper/styles.scss +0 -13
  95. package/dist/es/f/common/InputWrapper/InputWrapper.js +0 -61
  96. package/dist/es/f/common/InputWrapper/index.js +0 -2
  97. package/dist/es/f/common/InputWrapper/styles.scss +0 -13
  98. package/src/ui/f/common/InputWrapper/InputWrapper.jsx +0 -83
  99. package/src/ui/f/common/InputWrapper/index.js +0 -2
  100. package/src/ui/f/common/InputWrapper/styles.scss +0 -13
@@ -6,9 +6,4 @@
6
6
 
7
7
  .#{bem.$base}.form-label {
8
8
  color: var(--x);
9
- grid-column: span var(--column-span);
10
-
11
- @include mixins.media($from: $sm-md) {
12
- grid-column: span var(--column-span-md);
13
- }
14
9
  }
@@ -1,5 +1,4 @@
1
1
  export { Label as FormLabel } from './Label'
2
2
  export { Description as FormDescription } from './Description'
3
3
  export { Debugger as FormDebugger } from './Debugger'
4
- export { InputWrapper } from './InputWrapper'
5
4
  export * from './utils'
@@ -1,15 +1,15 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
+ import { useInsertionEffect } from 'react'
5
+
4
6
  import PropTypes from 'prop-types'
5
7
 
6
8
  import styleNames from '@pareto-engineering/bem/exports'
7
9
 
8
10
  import { useField } from 'formik'
9
11
 
10
- import { FormLabel, FormDescription, InputWrapper } from '../../common'
11
-
12
- import './styles.scss'
12
+ import { FormLabel, FormDescription } from '../../common'
13
13
 
14
14
  // Local Definitions
15
15
 
@@ -30,51 +30,45 @@ const Checkbox = ({
30
30
  disabled,
31
31
  optional,
32
32
  labelColor,
33
- labelSpan,
34
- desktopLabelSpan,
35
- inputSpan,
36
- desktopInputSpan,
37
33
  // ...otherProps
38
34
  }) => {
35
+ useInsertionEffect(() => {
36
+ import('./styles.scss')
37
+ }, [])
38
+
39
39
  const [field] = useField({ name, type: 'checkbox' })
40
40
 
41
41
  return (
42
- <>
42
+ <div
43
+ id={id}
44
+ className={[
45
+ baseClassName,
46
+ componentClassName,
47
+ userClassName,
48
+ ]
49
+ .filter((e) => e)
50
+ .join(' ')}
51
+ style={style}
52
+ >
43
53
  {label && (
44
54
  <FormLabel
45
55
  name={name}
46
56
  color={labelColor}
47
57
  optional={optional}
48
- columnSpan={labelSpan}
49
- desktopColumnSpan={desktopLabelSpan}
50
58
  // {...otherProps}
51
59
  >
52
60
  {label}
53
61
  </FormLabel>
54
62
  )}
55
- <InputWrapper
56
- id={id}
57
- className={[
58
- baseClassName,
59
- componentClassName,
60
- userClassName,
61
- ]
62
- .filter((e) => e)
63
- .join(' ')}
64
- style={style}
65
- columnSpan={inputSpan}
66
- desktopColumnSpan={desktopInputSpan}
67
- >
68
- <input
69
- id={name}
70
- className="input"
71
- type="checkbox"
72
- disabled={disabled}
73
- {...field}
74
- />
75
- <FormDescription className="s-1" description={description} name={name} />
76
- </InputWrapper>
77
- </>
63
+ <input
64
+ id={name}
65
+ className="input"
66
+ type="checkbox"
67
+ disabled={disabled}
68
+ {...field}
69
+ />
70
+ <FormDescription className="s-1" description={description} name={name} />
71
+ </div>
78
72
  )
79
73
  }
80
74
 
@@ -5,10 +5,12 @@
5
5
  @use "@pareto-engineering/styles/src/globals" as *;
6
6
 
7
7
  .#{bem.$base}.checkbox {
8
- &.#{bem.$base}.input-wrapper {
9
- align-items: flex-start;
10
- display: flex;
11
- flex-direction: column;
12
- justify-content: center;
8
+ align-items: flex-start;
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: center;
12
+
13
+ > .#{bem.$base}.form-label {
14
+ margin-bottom: var(--gap);
13
15
  }
14
16
  }
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { memo } from 'react'
4
+ import { useInsertionEffect, memo } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -11,9 +11,7 @@ import styleNames from '@pareto-engineering/bem/exports'
11
11
 
12
12
  import { Choice } from './common'
13
13
 
14
- import { FormDescription, FormLabel, InputWrapper } from '../../common'
15
-
16
- import './styles.scss'
14
+ import { FormDescription, FormLabel } from '../../common'
17
15
 
18
16
  const baseClassName = styleNames.base
19
17
 
@@ -37,26 +35,14 @@ const ChoicesInput = ({
37
35
  disabled,
38
36
  description,
39
37
  spaceBetween,
40
- labelSpan,
41
- desktopLabelSpan,
42
- inputSpan,
43
- desktopInputSpan,
44
38
  ...otherProps
45
- }) => (
46
- <>
47
- {label && (
48
- <FormLabel
49
- name={name}
50
- color={labelColor}
51
- optional={optional}
52
- columnSpan={labelSpan}
53
- desktopColumnSpan={desktopLabelSpan}
54
- // {...otherProps}
55
- >
56
- {label}
57
- </FormLabel>
58
- )}
59
- <InputWrapper
39
+ }) => {
40
+ useInsertionEffect(() => {
41
+ import('./styles.scss')
42
+ }, [])
43
+
44
+ return (
45
+ <div
60
46
  id={id}
61
47
  className={[
62
48
  baseClassName,
@@ -66,9 +52,17 @@ const ChoicesInput = ({
66
52
  .filter((e) => e)
67
53
  .join(' ')}
68
54
  style={style}
69
- columnSpan={inputSpan}
70
- desktopColumnSpan={desktopInputSpan}
71
55
  >
56
+ {label && (
57
+ <FormLabel
58
+ name={name}
59
+ color={labelColor}
60
+ optional={optional}
61
+ // {...otherProps}
62
+ >
63
+ {label}
64
+ </FormLabel>
65
+ )}
72
66
  <div className={['choices', spaceBetween && 'space-between'].filter(Boolean).join(' ')}>
73
67
  { options.map((choice) => (
74
68
  <Choice
@@ -85,9 +79,9 @@ const ChoicesInput = ({
85
79
  ))}
86
80
  </div>
87
81
  <FormDescription className="s-1" description={description} name={name} />
88
- </InputWrapper>
89
- </>
90
- )
82
+ </div>
83
+ )
84
+ }
91
85
 
92
86
  ChoicesInput.propTypes = {
93
87
  /**
@@ -122,31 +116,28 @@ ChoicesInput.propTypes = {
122
116
  /**
123
117
  * If the input should be multiple - checkbox
124
118
  */
125
- multiple :PropTypes.bool,
119
+ multiple :PropTypes.bool,
126
120
  /**
127
121
  * how many columns should be displayed on the mobile grid
128
122
  */
129
- gridColumnsMobile :PropTypes.number,
130
- /**
131
- * how many columns should be displayed on the desktop grid
132
- */
133
- gridColumnsDesktop:PropTypes.number,
123
+ gridColumnsMobile:PropTypes.number,
124
+
134
125
  /**
135
126
  * The choice color
136
127
  */
137
- color :PropTypes.string,
128
+ color :PropTypes.string,
138
129
  /**
139
130
  * The selected choice color
140
131
  */
141
- colorChecked :PropTypes.string,
132
+ colorChecked:PropTypes.string,
142
133
  /**
143
134
  * The label of the choices input
144
135
  */
145
- label :PropTypes.string,
136
+ label :PropTypes.string,
146
137
  /**
147
138
  * Whether all the Choices inputs should be disabled
148
139
  */
149
- disabled :PropTypes.bool,
140
+ disabled :PropTypes.bool,
150
141
 
151
142
  /**
152
143
  * Whether the input is optional or not
@@ -18,59 +18,62 @@ $default-background: var(--background-inputs);
18
18
  $disabled-background: var(--background-inputs-30);
19
19
 
20
20
  .#{bem.$base}.choices-input {
21
- &.#{bem.$base}.input-wrapper {
21
+ display: flex;
22
+ flex-direction: column;
23
+
24
+ > .#{bem.$base}.form-label {
25
+ margin-bottom: var(--gap);
26
+ }
27
+
28
+ > .choices {
22
29
  display: flex;
23
- flex-direction: column;
30
+ flex-wrap: wrap;
31
+ gap: $default-flex-separator;
24
32
 
25
- > .choices {
33
+ &.space-between {
34
+ justify-content: space-between;
35
+ }
36
+
37
+ >.choice {
26
38
  display: flex;
27
- flex-wrap: wrap;
28
- gap: $default-flex-separator;
29
39
 
30
- &.space-between {
31
- justify-content: space-between;
40
+ input {
41
+ opacity: 0;
42
+ position: fixed;
43
+ visibility: none;
44
+ z-index: -1;
32
45
  }
33
46
 
34
- >.choice {
35
- display: flex;
36
-
37
- input {
38
- opacity: 0;
39
- position: fixed;
40
- visibility: none;
41
- z-index: -1;
42
- }
43
-
44
- input:disabled + label {
45
- background-color: $disabled-background;
46
- }
47
+ input:disabled + label {
48
+ background-color: $disabled-background;
49
+ }
47
50
 
48
- > label {
49
- background-color: $default-background;
50
- border: $default-border;
51
- border-radius: $default-input-border-radius;
52
- color: var(--paragraph);
53
- cursor: pointer;
54
- display: block;
55
- height: $default-label-height;
56
- max-width: 100%;
57
- padding: $default-label-padding;
58
- position: relative;
59
- transition: $default-transition;
60
- white-space: nowrap;
51
+ > label {
52
+ background-color: $default-background;
53
+ border: $default-border;
54
+ border-radius: $default-input-border-radius;
55
+ color: var(--paragraph);
56
+ cursor: pointer;
57
+ display: block;
58
+ height: $default-label-height;
59
+ max-width: 100%;
60
+ padding: $default-label-padding;
61
+ position: relative;
62
+ transition: $default-transition;
63
+ white-space: nowrap;
61
64
 
62
- &:not(.disabled) {
63
- &:hover {
64
- border: $hover-border;
65
- }
65
+ &:not(.disabled) {
66
+ &:hover {
67
+ border: $hover-border;
66
68
  }
67
69
  }
70
+ }
68
71
 
69
- input:checked + label {
70
- background: var(--x);
71
- color: var(--on-x);
72
- }
72
+ input:checked + label {
73
+ background: var(--x);
74
+ color: var(--on-x);
73
75
  }
74
76
  }
75
77
  }
76
78
  }
79
+
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  /* eslint-disable import/no-extraneous-dependencies -- required here */
3
3
  import * as React from 'react'
4
- import { memo } from 'react'
4
+ import { useInsertionEffect, memo } from 'react'
5
5
  import { useFormikContext } from 'formik'
6
6
  import { LexicalComposer } from '@lexical/react/LexicalComposer'
7
7
  import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
@@ -16,11 +16,10 @@ import { ListItemNode, ListNode } from '@lexical/list'
16
16
 
17
17
  import PropTypes from 'prop-types'
18
18
  import styleNames from '@pareto-engineering/bem/exports'
19
- import './styles.scss'
20
19
 
21
20
  // Local Definitions
22
21
 
23
- import { FormLabel, FormDescription, InputWrapper } from '../../common'
22
+ import { FormLabel, FormDescription } from '../../common'
24
23
  import { Toolbar, TreeViewPlugin } from './common'
25
24
 
26
25
  const baseClassName = styleNames.base
@@ -43,13 +42,13 @@ const EditorInput = ({
43
42
  labelColor,
44
43
  description,
45
44
  disabled,
46
- labelSpan,
47
- desktopLabelSpan,
48
- inputSpan,
49
- desktopInputSpan,
50
45
  showDebugger,
51
46
  // ...otherProps
52
47
  }) => {
48
+ useInsertionEffect(() => {
49
+ import('./styles.scss')
50
+ }, [])
51
+
53
52
  const formik = useFormikContext()
54
53
 
55
54
  const setInitialValue = () => {
@@ -122,17 +121,7 @@ const EditorInput = ({
122
121
  <LexicalComposer
123
122
  initialConfig={initialConfig}
124
123
  >
125
- <FormLabel
126
- name={name}
127
- color={labelColor}
128
- optional={optional}
129
- columnSpan={labelSpan}
130
- desktopColumnSpan={desktopLabelSpan}
131
- // {...otherProps}
132
- >
133
- {label}
134
- </FormLabel>
135
- <InputWrapper
124
+ <div
136
125
  id={id}
137
126
  className={[
138
127
  baseClassName,
@@ -148,9 +137,15 @@ const EditorInput = ({
148
137
  '--resize':resize,
149
138
  '--rows' :`${rows}em`,
150
139
  }}
151
- columnSpan={inputSpan}
152
- desktopColumnSpan={desktopInputSpan}
153
140
  >
141
+ <FormLabel
142
+ name={name}
143
+ color={labelColor}
144
+ optional={optional}
145
+ >
146
+ {label}
147
+ </FormLabel>
148
+
154
149
  { !disabled && <Toolbar /> }
155
150
  <RichTextPlugin
156
151
  contentEditable={(
@@ -167,7 +162,7 @@ const EditorInput = ({
167
162
  <HistoryPlugin />
168
163
  <FormDescription className="s-1" description={description} name={name} />
169
164
  { showDebugger && <TreeViewPlugin />}
170
- </InputWrapper>
165
+ </div>
171
166
  </LexicalComposer>
172
167
  )
173
168
  }
@@ -233,26 +228,6 @@ EditorInput.propTypes = {
233
228
  */
234
229
  optional:PropTypes.bool,
235
230
 
236
- /**
237
- * The number of columns the label should span
238
- */
239
- labelSpan:PropTypes.number,
240
-
241
- /**
242
- * The number of columns the input should span
243
- */
244
- inputSpan:PropTypes.number,
245
-
246
- /**
247
- * The number of columns the label should span on desktop
248
- */
249
- desktopLabelSpan:PropTypes.number,
250
-
251
- /**
252
- * The number of columns the input should span on desktop
253
- */
254
- desktopInputSpan:PropTypes.number,
255
-
256
231
  /**
257
232
  * The resize property of the text area
258
233
  */
@@ -1,5 +1,4 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
- /* stylelint-disable max-nesting-depth -- required here */
3
2
 
4
3
  @use "@pareto-engineering/bem";
5
4
  @use "@pareto-engineering/styles/src/mixins";
@@ -18,124 +17,127 @@ $disabled-background: var(--background-inputs-30);
18
17
  $default-color-menu-padding: .5em .25em;
19
18
 
20
19
  .#{bem.$base}.editor-input {
21
- &.#{bem.$base}.input-wrapper {
20
+ display: flex;
21
+ flex-direction: column;
22
+
23
+ > .#{bem.$base}.form-label {
24
+ margin-bottom: var(--gap);
25
+ }
26
+
27
+ > .#{bem.$base}.toolbar {
22
28
  display: flex;
23
- flex-direction: column;
24
-
25
- > .#{bem.$base}.toolbar {
26
- display: flex;
27
- gap: $default-gap;
28
- margin-bottom: .25em;
29
-
30
- > .group {
31
- > button {
32
- background: $default-background;
33
- border: $default-border;
34
- color: $default-icon-color;
35
- padding: $default-padding;
36
-
37
- &.active {
38
- background-color: $active-background;
39
- }
29
+ gap: $default-gap;
30
+ margin-bottom: .25em;
31
+
32
+ > .group {
33
+ > button {
34
+ background: $default-background;
35
+ border: $default-border;
36
+ color: $default-icon-color;
37
+ padding: $default-padding;
38
+
39
+ &.active {
40
+ background-color: $active-background;
40
41
  }
41
42
  }
42
-
43
- .flip {
44
- transform: scaleX(-1);
45
- }
46
43
  }
47
44
 
48
- &:not(.disabled) {
49
- &:hover,
50
- &:focus,
51
- &:active {
52
- > .textarea {
53
- border: $focus-border;
54
- }
55
- }
45
+ .flip {
46
+ transform: scaleX(-1);
56
47
  }
48
+ }
57
49
 
58
- &.disabled {
50
+ &:not(.disabled) {
51
+ &:hover,
52
+ &:focus,
53
+ &:active {
59
54
  > .textarea {
60
- background: $disabled-background;
61
- color: var(--metadata);
62
- cursor: not-allowed;
55
+ border: $focus-border;
63
56
  }
64
57
  }
58
+ }
65
59
 
66
- .color-menu-button {
67
- &:hover {
68
- > .#{bem.$base}.popover {
69
- display: block;
70
- }
71
- }
60
+ &.disabled {
61
+ > .textarea {
62
+ background: $disabled-background;
63
+ color: var(--metadata);
64
+ cursor: not-allowed;
65
+ }
66
+ }
72
67
 
68
+ .color-menu-button {
69
+ &:hover {
73
70
  > .#{bem.$base}.popover {
74
- padding: $default-color-menu-padding;
75
-
76
- .color-menu {
77
- display: flex;
78
- flex-wrap: wrap;
79
- gap: calc($default-gap / 2);
80
- justify-content: center;
81
- max-width: 10em;
82
- min-width: 5em;
83
- }
84
-
85
- .color-option:hover {
86
- opacity: .5;
87
- }
71
+ display: block;
88
72
  }
89
73
  }
90
74
 
91
- > .content-editable {
92
- background: $default-background;
93
- border: $default-border;
94
- border-radius: $default-input-border-radius;
95
- color: var(--y);
96
- height: var(--rows);
97
- outline: none;
98
- overflow: auto;
99
- padding: $default-padding;
100
- resize: var(--resize);
101
- width: 100%;
102
-
103
- li:has(ol, ul) {
104
- list-style-type: none;
75
+ > .#{bem.$base}.popover {
76
+ padding: $default-color-menu-padding;
77
+
78
+ .color-menu {
79
+ display: flex;
80
+ flex-wrap: wrap;
81
+ gap: calc($default-gap / 2);
82
+ justify-content: center;
83
+ max-width: 10em;
84
+ min-width: 5em;
105
85
  }
106
86
 
107
- p,
108
- span,
109
- strong,
110
- em,
111
- li {
112
- &.underlined {
113
- text-decoration: underline;
114
-
115
- &.strikethrough {
116
- text-decoration: underline line-through;
117
- }
118
- }
87
+ .color-option:hover {
88
+ opacity: .5;
89
+ }
90
+ }
91
+ }
119
92
 
120
- &.strikethrough {
121
- text-decoration: line-through;
122
- }
93
+ > .content-editable {
94
+ background: $default-background;
95
+ border: $default-border;
96
+ border-radius: $default-input-border-radius;
97
+ color: var(--y);
98
+ height: var(--rows);
99
+ outline: none;
100
+ overflow: auto;
101
+ padding: $default-padding;
102
+ resize: var(--resize);
103
+ width: 100%;
123
104
 
124
- &.italic {
125
- font-style: italic;
105
+ li:has(ol, ul) {
106
+ list-style-type: none;
107
+ }
108
+
109
+ p,
110
+ span,
111
+ strong,
112
+ em,
113
+ li {
114
+ &.underlined {
115
+ text-decoration: underline;
116
+
117
+ &.strikethrough {
118
+ text-decoration: underline line-through;
126
119
  }
127
120
  }
128
121
 
129
- :first-child {
130
- margin-top: 0;
122
+ &.strikethrough {
123
+ text-decoration: line-through;
131
124
  }
132
125
 
133
- &::placeholder {
134
- color: var(--metadata);
126
+ &.italic {
127
+ font-style: italic;
135
128
  }
136
129
  }
130
+
131
+ :first-child {
132
+ margin-top: 0;
133
+ }
134
+
135
+ &::placeholder {
136
+ color: var(--metadata);
137
+ }
137
138
  }
138
139
 
140
+
139
141
  > .tree-view-output {
140
142
  background: $default-background;
141
143
  border: $default-border;