@licklist/design 0.78.5-dev.41 → 0.78.5-dev.45
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/v2/components/Alert/Alert.js +87 -0
- package/dist/v2/components/Alert/Alert.scss.js +6 -0
- package/dist/v2/components/Button/Button.d.ts +8 -4
- package/dist/v2/components/Button/Button.d.ts.map +1 -1
- package/dist/v2/components/Button/Button.js +121 -0
- package/dist/v2/components/Button/Button.scss.js +6 -0
- package/dist/v2/components/Button/index.d.ts +2 -2
- package/dist/v2/components/Button/index.d.ts.map +1 -1
- package/dist/v2/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/v2/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/v2/components/Checkbox/Checkbox.js +231 -0
- package/dist/v2/components/Checkbox/Checkbox.scss.js +6 -0
- package/dist/v2/components/Checkbox/index.d.ts +3 -0
- package/dist/v2/components/Checkbox/index.d.ts.map +1 -0
- package/dist/v2/components/FormField/FormField.d.ts +10 -0
- package/dist/v2/components/FormField/FormField.d.ts.map +1 -0
- package/dist/v2/components/FormField/FormField.js +98 -0
- package/dist/v2/components/FormField/FormField.scss.js +6 -0
- package/dist/v2/components/FormField/index.d.ts +3 -0
- package/dist/v2/components/FormField/index.d.ts.map +1 -0
- package/dist/v2/components/NPSScore/NPSScore.js +546 -0
- package/dist/v2/components/NPSScore/NPSScore.scss.js +6 -0
- package/dist/v2/components/NewInput/NewInput.d.ts +20 -0
- package/dist/v2/components/NewInput/NewInput.d.ts.map +1 -0
- package/dist/v2/components/NewInput/NewInput.js +134 -0
- package/dist/v2/components/NewInput/index.d.ts +2 -0
- package/dist/v2/components/NewInput/index.d.ts.map +1 -0
- package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts +10 -0
- package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts.map +1 -0
- package/dist/v2/components/NewPageHeader/NewPageHeader.js +36 -0
- package/dist/v2/components/NewPageHeader/NewPageHeader.scss.js +6 -0
- package/dist/v2/components/NewPageHeader/index.d.ts +2 -0
- package/dist/v2/components/NewPageHeader/index.d.ts.map +1 -0
- package/dist/v2/components/SectionHeader/SectionHeader.d.ts +8 -0
- package/dist/v2/components/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/dist/v2/components/SectionHeader/SectionHeader.js +13 -0
- package/dist/v2/components/SectionHeader/SectionHeader.scss.js +6 -0
- package/dist/v2/components/SectionHeader/index.d.ts +3 -0
- package/dist/v2/components/SectionHeader/index.d.ts.map +1 -0
- package/dist/v2/components/Select/Select.scss.js +1 -1
- package/dist/v2/components/WYSIWYGEditor/Icons.d.ts +14 -0
- package/dist/v2/components/WYSIWYGEditor/Icons.d.ts.map +1 -0
- package/dist/v2/components/WYSIWYGEditor/Icons.js +192 -0
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts +13 -0
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts.map +1 -0
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.js +219 -0
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +6 -0
- package/dist/v2/components/WYSIWYGEditor/index.d.ts +3 -0
- package/dist/v2/components/WYSIWYGEditor/index.d.ts.map +1 -0
- package/dist/v2/components/index.d.ts +22 -0
- package/dist/v2/components/index.d.ts.map +1 -0
- package/dist/v2/styles/components/Button.scss +51 -53
- package/dist/v2/styles/form/Layout.scss +15 -0
- package/dist/v2/styles/form/NewInput.scss +76 -53
- package/dist/v2/styles/form/NewInput.scss.js +6 -0
- package/dist/v2/styles/index.scss +1 -0
- package/dist/v2/styles/tokens/_colors.scss +6 -6
- package/dist/v2/styles/tokens/_typography.scss +2 -2
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/v2/components/Alert/Alert.scss +3 -3
- package/src/v2/components/Button/Button.tsx +34 -12
- package/src/v2/components/Button/index.ts +2 -2
- package/src/v2/components/Checkbox/Checkbox.scss +205 -0
- package/src/v2/components/Checkbox/Checkbox.stories.tsx +316 -0
- package/src/v2/components/Checkbox/Checkbox.tsx +106 -0
- package/src/v2/components/Checkbox/index.ts +3 -0
- package/src/v2/components/FormField/FormField.scss +87 -0
- package/src/v2/components/FormField/FormField.stories.tsx +71 -0
- package/src/v2/components/FormField/FormField.tsx +37 -0
- package/src/v2/components/FormField/index.ts +3 -0
- package/src/v2/components/NewInput/NewInput.stories.tsx +433 -0
- package/src/v2/components/NewInput/NewInput.tsx +96 -0
- package/src/v2/components/NewInput/index.ts +1 -0
- package/src/v2/components/NewPageHeader/NewPageHeader.scss +47 -0
- package/src/v2/components/NewPageHeader/NewPageHeader.stories.tsx +44 -0
- package/src/v2/components/NewPageHeader/NewPageHeader.tsx +35 -0
- package/src/v2/components/NewPageHeader/index.ts +1 -0
- package/src/v2/components/SectionHeader/SectionHeader.scss +11 -0
- package/src/v2/components/SectionHeader/SectionHeader.tsx +15 -0
- package/src/v2/components/SectionHeader/index.ts +2 -0
- package/src/v2/components/Select/Select.scss +5 -5
- package/src/v2/components/WYSIWYGEditor/Icons.tsx +81 -0
- package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss +318 -0
- package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.stories.tsx +252 -0
- package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.tsx +237 -0
- package/src/v2/components/WYSIWYGEditor/index.ts +3 -0
- package/src/v2/components/index.ts +37 -0
- package/src/v2/styles/components/Button.scss +51 -53
- package/src/v2/styles/form/Layout.scss +15 -0
- package/src/v2/styles/form/NewInput.scss +76 -53
- package/src/v2/styles/index.scss +1 -0
- package/src/v2/styles/tokens/_colors.scss +6 -6
- package/src/v2/styles/tokens/_typography.scss +2 -2
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {
|
|
3
|
+
BoldIcon,
|
|
4
|
+
ItalicIcon,
|
|
5
|
+
UnderlineIcon,
|
|
6
|
+
StrikeThroughIcon,
|
|
7
|
+
Heading1Icon,
|
|
8
|
+
Heading2Icon,
|
|
9
|
+
BulletListIcon,
|
|
10
|
+
NumberedListIcon,
|
|
11
|
+
UndoIcon,
|
|
12
|
+
RedoIcon,
|
|
13
|
+
ParagraphIcon,
|
|
14
|
+
QuoteAltIcon,
|
|
15
|
+
DividerIcon,
|
|
16
|
+
} from './Icons'
|
|
17
|
+
import './WYSIWYGEditor.scss'
|
|
18
|
+
|
|
19
|
+
export interface WYSIWYGEditorProps {
|
|
20
|
+
label?: string
|
|
21
|
+
error?: string
|
|
22
|
+
helpText?: string
|
|
23
|
+
value?: string
|
|
24
|
+
onChange?: (value: string) => void
|
|
25
|
+
placeholder?: string
|
|
26
|
+
disabled?: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const WYSIWYGEditor: React.FC<WYSIWYGEditorProps> = ({
|
|
30
|
+
label,
|
|
31
|
+
error,
|
|
32
|
+
helpText,
|
|
33
|
+
value,
|
|
34
|
+
onChange,
|
|
35
|
+
placeholder,
|
|
36
|
+
disabled = false,
|
|
37
|
+
}) => {
|
|
38
|
+
const contentRef = React.useRef<HTMLDivElement>(null)
|
|
39
|
+
const isInternalChange = React.useRef(false)
|
|
40
|
+
|
|
41
|
+
// Only update innerHTML when value changes externally (not from user input)
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
if (contentRef.current) {
|
|
44
|
+
if (isInternalChange.current) {
|
|
45
|
+
isInternalChange.current = false
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const currentHTML = contentRef.current.innerHTML
|
|
50
|
+
if (currentHTML !== value) {
|
|
51
|
+
contentRef.current.innerHTML = value || ''
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}, [value])
|
|
55
|
+
|
|
56
|
+
const handleInput = () => {
|
|
57
|
+
if (contentRef.current) {
|
|
58
|
+
isInternalChange.current = true
|
|
59
|
+
onChange?.(contentRef.current.innerHTML)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const execCommand = (command: string, value?: string) => {
|
|
64
|
+
if (command === 'insertHorizontalRule') {
|
|
65
|
+
const selection = window.getSelection()
|
|
66
|
+
if (selection && selection.rangeCount > 0) {
|
|
67
|
+
const range = selection.getRangeAt(0)
|
|
68
|
+
range.deleteContents()
|
|
69
|
+
|
|
70
|
+
const hr = document.createElement('hr')
|
|
71
|
+
const p = document.createElement('p')
|
|
72
|
+
p.innerHTML = '<br>' // Ensure the paragraph is "typeable"
|
|
73
|
+
|
|
74
|
+
// Insert HR and then the paragraph after it
|
|
75
|
+
range.insertNode(p)
|
|
76
|
+
range.insertNode(hr)
|
|
77
|
+
|
|
78
|
+
// Move cursor to the new paragraph
|
|
79
|
+
const newRange = document.createRange()
|
|
80
|
+
newRange.setStart(p, 0)
|
|
81
|
+
newRange.setEnd(p, 0)
|
|
82
|
+
newRange.collapse(true)
|
|
83
|
+
selection.removeAllRanges()
|
|
84
|
+
selection.addRange(newRange)
|
|
85
|
+
|
|
86
|
+
handleInput()
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
document.execCommand(command, false, value)
|
|
91
|
+
handleInput()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div className="wysiwyg-editor">
|
|
96
|
+
{label && (
|
|
97
|
+
<label className="wysiwyg-editor__label">
|
|
98
|
+
{label}
|
|
99
|
+
</label>
|
|
100
|
+
)}
|
|
101
|
+
<div className={`wysiwyg-editor__wrapper ${error ? 'wysiwyg-editor__wrapper--error' : ''}`}>
|
|
102
|
+
<div className="wysiwyg-editor__toolbar">
|
|
103
|
+
<button
|
|
104
|
+
type="button"
|
|
105
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
106
|
+
title="Bold"
|
|
107
|
+
onClick={() => execCommand('bold')}
|
|
108
|
+
>
|
|
109
|
+
<BoldIcon />
|
|
110
|
+
</button>
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
114
|
+
title="Italic"
|
|
115
|
+
onClick={() => execCommand('italic')}
|
|
116
|
+
>
|
|
117
|
+
<ItalicIcon />
|
|
118
|
+
</button>
|
|
119
|
+
<button
|
|
120
|
+
type="button"
|
|
121
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
122
|
+
title="Underline"
|
|
123
|
+
onClick={() => execCommand('underline')}
|
|
124
|
+
>
|
|
125
|
+
<UnderlineIcon />
|
|
126
|
+
</button>
|
|
127
|
+
<button
|
|
128
|
+
type="button"
|
|
129
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
130
|
+
title="Strikethrough"
|
|
131
|
+
onClick={() => execCommand('strikeThrough')}
|
|
132
|
+
>
|
|
133
|
+
<StrikeThroughIcon />
|
|
134
|
+
</button>
|
|
135
|
+
<button
|
|
136
|
+
type="button"
|
|
137
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
138
|
+
title="Heading 1"
|
|
139
|
+
onClick={() => execCommand('formatBlock', 'H1')}
|
|
140
|
+
>
|
|
141
|
+
<Heading1Icon />
|
|
142
|
+
</button>
|
|
143
|
+
<button
|
|
144
|
+
type="button"
|
|
145
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
146
|
+
title="Heading 2"
|
|
147
|
+
onClick={() => execCommand('formatBlock', 'H2')}
|
|
148
|
+
>
|
|
149
|
+
<Heading2Icon />
|
|
150
|
+
</button>
|
|
151
|
+
<button
|
|
152
|
+
type="button"
|
|
153
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
154
|
+
title="Paragraph"
|
|
155
|
+
onClick={() => {
|
|
156
|
+
execCommand('formatBlock', 'P')
|
|
157
|
+
execCommand('removeFormat')
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<ParagraphIcon />
|
|
161
|
+
</button>
|
|
162
|
+
<button
|
|
163
|
+
type="button"
|
|
164
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
165
|
+
title="Quote"
|
|
166
|
+
onClick={() => execCommand('formatBlock', 'BLOCKQUOTE')}
|
|
167
|
+
>
|
|
168
|
+
<QuoteAltIcon />
|
|
169
|
+
</button>
|
|
170
|
+
<button
|
|
171
|
+
type="button"
|
|
172
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
173
|
+
title="Bullet List"
|
|
174
|
+
onClick={() => execCommand('insertUnorderedList')}
|
|
175
|
+
>
|
|
176
|
+
<BulletListIcon />
|
|
177
|
+
</button>
|
|
178
|
+
<button
|
|
179
|
+
type="button"
|
|
180
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
181
|
+
title="Numbered List"
|
|
182
|
+
onClick={() => execCommand('insertOrderedList')}
|
|
183
|
+
>
|
|
184
|
+
<NumberedListIcon />
|
|
185
|
+
</button>
|
|
186
|
+
<button
|
|
187
|
+
type="button"
|
|
188
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
189
|
+
title="Divider"
|
|
190
|
+
onClick={() => execCommand('insertHorizontalRule')}
|
|
191
|
+
>
|
|
192
|
+
<DividerIcon />
|
|
193
|
+
</button>
|
|
194
|
+
<button
|
|
195
|
+
type="button"
|
|
196
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
197
|
+
title="Undo"
|
|
198
|
+
onClick={() => {
|
|
199
|
+
if (document.queryCommandEnabled('undo')) {
|
|
200
|
+
document.execCommand('undo', false)
|
|
201
|
+
handleInput()
|
|
202
|
+
}
|
|
203
|
+
}}
|
|
204
|
+
>
|
|
205
|
+
<UndoIcon />
|
|
206
|
+
</button>
|
|
207
|
+
<button
|
|
208
|
+
type="button"
|
|
209
|
+
className="wysiwyg-editor__toolbar-btn"
|
|
210
|
+
title="Redo"
|
|
211
|
+
onClick={() => {
|
|
212
|
+
if (document.queryCommandEnabled('redo')) {
|
|
213
|
+
document.execCommand('redo', false)
|
|
214
|
+
handleInput()
|
|
215
|
+
}
|
|
216
|
+
}}
|
|
217
|
+
>
|
|
218
|
+
<RedoIcon />
|
|
219
|
+
</button>
|
|
220
|
+
</div>
|
|
221
|
+
<div
|
|
222
|
+
ref={contentRef}
|
|
223
|
+
className={`wysiwyg-editor__content ${disabled ? 'wysiwyg-editor__content--disabled' : ''}`}
|
|
224
|
+
contentEditable={!disabled}
|
|
225
|
+
suppressContentEditableWarning
|
|
226
|
+
onInput={handleInput}
|
|
227
|
+
data-placeholder={placeholder}
|
|
228
|
+
/>
|
|
229
|
+
</div>
|
|
230
|
+
{helpText && (
|
|
231
|
+
<span className="wysiwyg-editor__help-text">{helpText}</span>
|
|
232
|
+
)}
|
|
233
|
+
{error && <span className="wysiwyg-editor__error-text">{error}</span>}
|
|
234
|
+
</div>
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Form Components
|
|
2
|
+
export { FormField } from './FormField'
|
|
3
|
+
export type { FormFieldProps } from './FormField'
|
|
4
|
+
|
|
5
|
+
export { NewInput } from './NewInput'
|
|
6
|
+
export type { NewInputProps } from './NewInput'
|
|
7
|
+
|
|
8
|
+
export { Checkbox } from './Checkbox'
|
|
9
|
+
export type { CheckboxProps } from './Checkbox'
|
|
10
|
+
|
|
11
|
+
export { WYSIWYGEditor } from './WYSIWYGEditor'
|
|
12
|
+
export type { WYSIWYGEditorProps } from './WYSIWYGEditor'
|
|
13
|
+
|
|
14
|
+
export { NewPageHeader } from './NewPageHeader'
|
|
15
|
+
export type { NewPageHeaderProps } from './NewPageHeader'
|
|
16
|
+
|
|
17
|
+
export { SectionHeader } from './SectionHeader'
|
|
18
|
+
export type { SectionHeaderProps } from './SectionHeader'
|
|
19
|
+
|
|
20
|
+
// Existing Components
|
|
21
|
+
export { Button, ButtonText } from './Button'
|
|
22
|
+
export type { ButtonProps, ButtonTextProps } from './Button'
|
|
23
|
+
|
|
24
|
+
export { Select } from './Select'
|
|
25
|
+
|
|
26
|
+
export { Tooltip } from './Tooltip'
|
|
27
|
+
|
|
28
|
+
export { UserAvatar } from './UserAvatar'
|
|
29
|
+
|
|
30
|
+
export { UserPanel } from './UserPanel'
|
|
31
|
+
|
|
32
|
+
export { EntityHeader } from './EntityHeader'
|
|
33
|
+
|
|
34
|
+
export { Alert } from './Alert'
|
|
35
|
+
|
|
36
|
+
export { NPSScore } from './NPSScore'
|
|
37
|
+
|
|
@@ -2,59 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
.new-button {
|
|
4
4
|
display: flex;
|
|
5
|
-
gap: var(--spacing-sm
|
|
6
|
-
align-items: center;
|
|
5
|
+
gap: var(--spacing-sm);
|
|
7
6
|
justify-content: center;
|
|
8
|
-
padding:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
font-
|
|
13
|
-
|
|
7
|
+
padding: 12px 24px;
|
|
8
|
+
align-self: flex-start;
|
|
9
|
+
text-align: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif), serif;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
line-height: 20px;
|
|
14
|
+
min-height: 44px;
|
|
14
15
|
border: none;
|
|
16
|
+
border-radius: 8px;
|
|
15
17
|
cursor: pointer;
|
|
16
18
|
transition: all 0.2s ease;
|
|
17
19
|
white-space: nowrap;
|
|
18
20
|
|
|
19
|
-
// Primary Button - Solid
|
|
21
|
+
// Primary Button - Solid purple
|
|
20
22
|
&--primary {
|
|
21
|
-
background:
|
|
22
|
-
|
|
23
|
-
rgba(255, 255, 255, 0.2) 0%,
|
|
24
|
-
var(--purples-purple-500) 5.77%,
|
|
25
|
-
var(--purples-purple-700) 95.19%,
|
|
26
|
-
var(--purples-purple-900) 100%
|
|
27
|
-
),
|
|
28
|
-
linear-gradient(
|
|
29
|
-
180deg,
|
|
30
|
-
var(--purples-purple-50) 0%,
|
|
31
|
-
var(--purples-purple-900) 100%
|
|
32
|
-
),
|
|
33
|
-
linear-gradient(90deg, var(--purples-purple-500) 0%, var(--purples-purple-500) 100%);
|
|
34
|
-
color: var(--labels-main-label-white, #ffffff);
|
|
23
|
+
background: #6200EE;
|
|
24
|
+
color: #ffffff;
|
|
35
25
|
|
|
36
26
|
&:hover {
|
|
37
|
-
background
|
|
27
|
+
background: #360083;
|
|
38
28
|
}
|
|
39
29
|
|
|
40
30
|
&:active,
|
|
41
31
|
&:focus {
|
|
42
|
-
background
|
|
32
|
+
background: #360083;
|
|
43
33
|
}
|
|
44
34
|
}
|
|
45
35
|
|
|
46
|
-
// Primary - Soft
|
|
36
|
+
// Primary - Soft (Light purple)
|
|
47
37
|
&--primary-soft {
|
|
48
|
-
background
|
|
49
|
-
color:
|
|
38
|
+
background: #efeffe;
|
|
39
|
+
color: #5d5bf4;
|
|
50
40
|
|
|
51
41
|
&:hover {
|
|
52
|
-
background
|
|
42
|
+
background: #cdccfc;
|
|
53
43
|
}
|
|
54
44
|
|
|
55
45
|
&:active {
|
|
56
|
-
background
|
|
57
|
-
color: var(--labels-main-label-white, #ffffff);
|
|
46
|
+
background: #b4b4fa;
|
|
58
47
|
}
|
|
59
48
|
}
|
|
60
49
|
|
|
@@ -76,39 +65,32 @@
|
|
|
76
65
|
|
|
77
66
|
// Secondary Button
|
|
78
67
|
&--secondary {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var(--neutrals-gray-200) 5.77%,
|
|
83
|
-
var(--purples-purple-700) 95.19%,
|
|
84
|
-
var(--purples-purple-900) 100%
|
|
85
|
-
),
|
|
86
|
-
linear-gradient(
|
|
87
|
-
180deg,
|
|
88
|
-
var(--neutrals-gray-200) 0%,
|
|
89
|
-
var(--fills-main-fill-secondary) 100%
|
|
90
|
-
),
|
|
91
|
-
linear-gradient(90deg, var(--fills-main-fill-secondary) 0%, var(--fills-main-fill-secondary) 100%);
|
|
92
|
-
color: var(--labels-main-label-white, #ffffff);
|
|
68
|
+
border-radius: var(--sizes-radius-radius, 8px);
|
|
69
|
+
background: var(--surface-action-soft);
|
|
70
|
+
color: var(--label-action);
|
|
93
71
|
|
|
94
|
-
&:hover
|
|
95
|
-
|
|
96
|
-
|
|
72
|
+
&:hover {
|
|
73
|
+
background: #EFE6FD;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:active,
|
|
77
|
+
&:focus {
|
|
78
|
+
background: #EFE6FD;
|
|
97
79
|
}
|
|
98
80
|
}
|
|
99
81
|
|
|
100
82
|
// Destructive - Soft
|
|
101
83
|
&--destructive-soft {
|
|
102
|
-
|
|
103
|
-
|
|
84
|
+
border-radius: var(--radius-reg, 8px);
|
|
85
|
+
background: var(--surface-danger-soft, #fceceb);
|
|
104
86
|
|
|
105
87
|
&:hover {
|
|
106
|
-
background-color: var(--
|
|
88
|
+
background-color: var(--surface-danger-soft-hover, #f5c4c2);
|
|
107
89
|
}
|
|
108
90
|
|
|
109
91
|
&:active {
|
|
110
|
-
background-color: var(--
|
|
111
|
-
color: var(--
|
|
92
|
+
background-color: var(--surface-danger-soft-pressed, #e66861);
|
|
93
|
+
color: var(--label-white, #ffffff);
|
|
112
94
|
}
|
|
113
95
|
}
|
|
114
96
|
|
|
@@ -155,6 +137,22 @@
|
|
|
155
137
|
pointer-events: none;
|
|
156
138
|
}
|
|
157
139
|
|
|
140
|
+
/* Button text styling */
|
|
141
|
+
&__text {
|
|
142
|
+
font-family: 'Geist', sans-serif;
|
|
143
|
+
font-size: 15px;
|
|
144
|
+
font-style: normal;
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
line-height: 20px;
|
|
147
|
+
text-align: center;
|
|
148
|
+
|
|
149
|
+
&--primary { color: var(--label-primary); }
|
|
150
|
+
&--secondary { color: var(--label-secondary); }
|
|
151
|
+
&--danger { color: var(--label-danger); }
|
|
152
|
+
&--white { color: var(--label-white); }
|
|
153
|
+
&--action { color: var(--label-action); }
|
|
154
|
+
}
|
|
155
|
+
|
|
158
156
|
// Text styling
|
|
159
157
|
p {
|
|
160
158
|
margin: 0;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.waiver-template-form-section {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
gap: var(--padding-reg, 16px);
|
|
6
|
+
align-self: stretch;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.waiver-template-form-group {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: var(--padding-lg, 24px);
|
|
14
|
+
align-self: stretch;
|
|
15
|
+
}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
/* New Form Input Styles based on Figma design tokens */
|
|
2
2
|
|
|
3
3
|
.new-form-input {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
gap: var(--spacing-sm);
|
|
8
|
+
align-self: stretch;
|
|
9
|
+
width: 100%;
|
|
8
10
|
|
|
9
11
|
&__label {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
13
|
+
font-size: 15px;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
line-height: 20px;
|
|
17
|
+
color: var(--label-primary, #121E52);
|
|
18
|
+
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
&__label-optional {
|
|
19
|
-
|
|
22
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
20
23
|
font-size: var(--text-xs-size, 11px);
|
|
21
|
-
font-weight:
|
|
24
|
+
font-weight: 400;
|
|
22
25
|
line-height: var(--text-xs-line, 14px);
|
|
23
26
|
color: var(--labels-main-label-secondary, #626a90);
|
|
24
27
|
text-align: right;
|
|
@@ -32,34 +35,39 @@
|
|
|
32
35
|
width: 100%;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
&__input {
|
|
39
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
40
|
+
font-size: var(--text-regular-size, 15px);
|
|
41
|
+
line-height: var(--text-regular-line, 20px);
|
|
42
|
+
flex: 1 0 0;
|
|
43
|
+
background-color: var(--surfaces-main-background-secondary);
|
|
44
|
+
border: 2px solid var(--border-primary);
|
|
45
|
+
border-radius: var(--radius-md);
|
|
46
|
+
padding: 8px 10px;
|
|
47
|
+
min-height: 40px;
|
|
48
|
+
background: var(--surface-secondary);
|
|
49
|
+
width: 100%;
|
|
50
|
+
transition: all 0.2s ease;
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
background-color: var(--surfaces-main-background-secondary, #f8f8fa);
|
|
52
|
-
}
|
|
52
|
+
@media (max-width: 768px) {
|
|
53
|
+
font-size: 16px;
|
|
54
|
+
}
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
&:focus {
|
|
57
|
+
outline: none;
|
|
58
|
+
border-color: var(--border-selected, #6200EE);
|
|
59
|
+
background-color: var(--surfaces-main-background-secondary, #f8f8fa);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&::placeholder {
|
|
63
|
+
color: var(--labels-main-label-secondary, #626a90);
|
|
57
64
|
}
|
|
65
|
+
}
|
|
58
66
|
|
|
59
67
|
&__textarea {
|
|
60
|
-
|
|
61
|
-
font-size: var(--text-
|
|
62
|
-
line-height: var(--text-
|
|
68
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
69
|
+
font-size: var(--text-regular-size, 15px);
|
|
70
|
+
line-height: var(--text-regular-line, 20px);
|
|
63
71
|
color: var(--labels-main-label-primary, #121e52);
|
|
64
72
|
background-color: var(--surfaces-main-background-secondary, #f8f8fa);
|
|
65
73
|
border: 1px solid var(--borders-main-border-primary, #e8e9ef);
|
|
@@ -70,9 +78,13 @@
|
|
|
70
78
|
resize: vertical;
|
|
71
79
|
transition: all 0.2s ease;
|
|
72
80
|
|
|
81
|
+
@media (max-width: 768px) {
|
|
82
|
+
font-size: 16px;
|
|
83
|
+
}
|
|
84
|
+
|
|
73
85
|
&:focus {
|
|
74
86
|
outline: none;
|
|
75
|
-
border-color: var(--
|
|
87
|
+
border-color: var(--border-selected, #6200EE);
|
|
76
88
|
}
|
|
77
89
|
|
|
78
90
|
&::placeholder {
|
|
@@ -88,16 +100,20 @@
|
|
|
88
100
|
border: 2px solid var(--borders-main-border-primary, #e8e9ef);
|
|
89
101
|
border-radius: var(--radius-md, 4px);
|
|
90
102
|
padding: 5px;
|
|
91
|
-
height: 40px;
|
|
103
|
+
min-height: 40px;
|
|
92
104
|
|
|
93
105
|
input {
|
|
94
106
|
flex: 1;
|
|
95
107
|
border: none;
|
|
96
108
|
background: transparent;
|
|
97
109
|
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
98
|
-
font-size: var(--text-
|
|
99
|
-
line-height: var(--text-
|
|
100
|
-
color: var(--
|
|
110
|
+
font-size: var(--text-regular-size, 15px);
|
|
111
|
+
line-height: var(--text-regular-line, 20px);
|
|
112
|
+
color: var(--label-primary);
|
|
113
|
+
|
|
114
|
+
@media (max-width: 768px) {
|
|
115
|
+
font-size: 16px;
|
|
116
|
+
}
|
|
101
117
|
|
|
102
118
|
&:focus {
|
|
103
119
|
outline: none;
|
|
@@ -134,24 +150,35 @@
|
|
|
134
150
|
|
|
135
151
|
&:focus {
|
|
136
152
|
outline: none;
|
|
137
|
-
border-color: var(--
|
|
153
|
+
border-color: var(--border-selected, #6200EE);
|
|
138
154
|
}
|
|
139
155
|
}
|
|
140
156
|
}
|
|
141
157
|
|
|
142
158
|
&__helper-text {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
159
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
160
|
+
font-size: var(--text-regular-size, 15px);
|
|
161
|
+
font-style: normal;
|
|
162
|
+
font-weight: 400;
|
|
163
|
+
line-height: var(--text-regular-line, 20px);
|
|
164
|
+
margin-top: 2px;
|
|
165
|
+
color: var(--label-secondary, #626A90);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&__error-text {
|
|
169
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
170
|
+
font-size: 11px;
|
|
171
|
+
font-style: normal;
|
|
172
|
+
font-weight: 400;
|
|
173
|
+
line-height: 14px;
|
|
174
|
+
margin-top: 2px;
|
|
175
|
+
color: var(--labels-status-label-error, #ef4444);
|
|
149
176
|
}
|
|
150
177
|
|
|
151
178
|
// States
|
|
152
179
|
&--active {
|
|
153
180
|
.new-form-input__input {
|
|
154
|
-
border-color: var(--
|
|
181
|
+
border-color: var(--border-selected, #6200EE);
|
|
155
182
|
}
|
|
156
183
|
}
|
|
157
184
|
|
|
@@ -159,14 +186,10 @@
|
|
|
159
186
|
.new-form-input__input {
|
|
160
187
|
border-color: var(--borders-status-border-error, #ef4444);
|
|
161
188
|
}
|
|
162
|
-
|
|
163
|
-
.new-form-input__helper-text {
|
|
164
|
-
color: var(--labels-status-label-error, #ef4444);
|
|
165
|
-
}
|
|
166
189
|
}
|
|
167
190
|
|
|
168
191
|
&--disabled {
|
|
169
192
|
opacity: var(--opacity-50, 0.5);
|
|
170
193
|
pointer-events: none;
|
|
171
194
|
}
|
|
172
|
-
}
|
|
195
|
+
}
|
package/src/v2/styles/index.scss
CHANGED