@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.
Files changed (97) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +14 -0
  4. package/dist/v2/components/Alert/Alert.js +87 -0
  5. package/dist/v2/components/Alert/Alert.scss.js +6 -0
  6. package/dist/v2/components/Button/Button.d.ts +8 -4
  7. package/dist/v2/components/Button/Button.d.ts.map +1 -1
  8. package/dist/v2/components/Button/Button.js +121 -0
  9. package/dist/v2/components/Button/Button.scss.js +6 -0
  10. package/dist/v2/components/Button/index.d.ts +2 -2
  11. package/dist/v2/components/Button/index.d.ts.map +1 -1
  12. package/dist/v2/components/Checkbox/Checkbox.d.ts +9 -0
  13. package/dist/v2/components/Checkbox/Checkbox.d.ts.map +1 -0
  14. package/dist/v2/components/Checkbox/Checkbox.js +231 -0
  15. package/dist/v2/components/Checkbox/Checkbox.scss.js +6 -0
  16. package/dist/v2/components/Checkbox/index.d.ts +3 -0
  17. package/dist/v2/components/Checkbox/index.d.ts.map +1 -0
  18. package/dist/v2/components/FormField/FormField.d.ts +10 -0
  19. package/dist/v2/components/FormField/FormField.d.ts.map +1 -0
  20. package/dist/v2/components/FormField/FormField.js +98 -0
  21. package/dist/v2/components/FormField/FormField.scss.js +6 -0
  22. package/dist/v2/components/FormField/index.d.ts +3 -0
  23. package/dist/v2/components/FormField/index.d.ts.map +1 -0
  24. package/dist/v2/components/NPSScore/NPSScore.js +546 -0
  25. package/dist/v2/components/NPSScore/NPSScore.scss.js +6 -0
  26. package/dist/v2/components/NewInput/NewInput.d.ts +20 -0
  27. package/dist/v2/components/NewInput/NewInput.d.ts.map +1 -0
  28. package/dist/v2/components/NewInput/NewInput.js +134 -0
  29. package/dist/v2/components/NewInput/index.d.ts +2 -0
  30. package/dist/v2/components/NewInput/index.d.ts.map +1 -0
  31. package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts +10 -0
  32. package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts.map +1 -0
  33. package/dist/v2/components/NewPageHeader/NewPageHeader.js +36 -0
  34. package/dist/v2/components/NewPageHeader/NewPageHeader.scss.js +6 -0
  35. package/dist/v2/components/NewPageHeader/index.d.ts +2 -0
  36. package/dist/v2/components/NewPageHeader/index.d.ts.map +1 -0
  37. package/dist/v2/components/SectionHeader/SectionHeader.d.ts +8 -0
  38. package/dist/v2/components/SectionHeader/SectionHeader.d.ts.map +1 -0
  39. package/dist/v2/components/SectionHeader/SectionHeader.js +13 -0
  40. package/dist/v2/components/SectionHeader/SectionHeader.scss.js +6 -0
  41. package/dist/v2/components/SectionHeader/index.d.ts +3 -0
  42. package/dist/v2/components/SectionHeader/index.d.ts.map +1 -0
  43. package/dist/v2/components/Select/Select.scss.js +1 -1
  44. package/dist/v2/components/WYSIWYGEditor/Icons.d.ts +14 -0
  45. package/dist/v2/components/WYSIWYGEditor/Icons.d.ts.map +1 -0
  46. package/dist/v2/components/WYSIWYGEditor/Icons.js +192 -0
  47. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts +13 -0
  48. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.d.ts.map +1 -0
  49. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.js +219 -0
  50. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +6 -0
  51. package/dist/v2/components/WYSIWYGEditor/index.d.ts +3 -0
  52. package/dist/v2/components/WYSIWYGEditor/index.d.ts.map +1 -0
  53. package/dist/v2/components/index.d.ts +22 -0
  54. package/dist/v2/components/index.d.ts.map +1 -0
  55. package/dist/v2/styles/components/Button.scss +51 -53
  56. package/dist/v2/styles/form/Layout.scss +15 -0
  57. package/dist/v2/styles/form/NewInput.scss +76 -53
  58. package/dist/v2/styles/form/NewInput.scss.js +6 -0
  59. package/dist/v2/styles/index.scss +1 -0
  60. package/dist/v2/styles/tokens/_colors.scss +6 -6
  61. package/dist/v2/styles/tokens/_typography.scss +2 -2
  62. package/package.json +3 -3
  63. package/src/index.ts +1 -0
  64. package/src/v2/components/Alert/Alert.scss +3 -3
  65. package/src/v2/components/Button/Button.tsx +34 -12
  66. package/src/v2/components/Button/index.ts +2 -2
  67. package/src/v2/components/Checkbox/Checkbox.scss +205 -0
  68. package/src/v2/components/Checkbox/Checkbox.stories.tsx +316 -0
  69. package/src/v2/components/Checkbox/Checkbox.tsx +106 -0
  70. package/src/v2/components/Checkbox/index.ts +3 -0
  71. package/src/v2/components/FormField/FormField.scss +87 -0
  72. package/src/v2/components/FormField/FormField.stories.tsx +71 -0
  73. package/src/v2/components/FormField/FormField.tsx +37 -0
  74. package/src/v2/components/FormField/index.ts +3 -0
  75. package/src/v2/components/NewInput/NewInput.stories.tsx +433 -0
  76. package/src/v2/components/NewInput/NewInput.tsx +96 -0
  77. package/src/v2/components/NewInput/index.ts +1 -0
  78. package/src/v2/components/NewPageHeader/NewPageHeader.scss +47 -0
  79. package/src/v2/components/NewPageHeader/NewPageHeader.stories.tsx +44 -0
  80. package/src/v2/components/NewPageHeader/NewPageHeader.tsx +35 -0
  81. package/src/v2/components/NewPageHeader/index.ts +1 -0
  82. package/src/v2/components/SectionHeader/SectionHeader.scss +11 -0
  83. package/src/v2/components/SectionHeader/SectionHeader.tsx +15 -0
  84. package/src/v2/components/SectionHeader/index.ts +2 -0
  85. package/src/v2/components/Select/Select.scss +5 -5
  86. package/src/v2/components/WYSIWYGEditor/Icons.tsx +81 -0
  87. package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss +318 -0
  88. package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.stories.tsx +252 -0
  89. package/src/v2/components/WYSIWYGEditor/WYSIWYGEditor.tsx +237 -0
  90. package/src/v2/components/WYSIWYGEditor/index.ts +3 -0
  91. package/src/v2/components/index.ts +37 -0
  92. package/src/v2/styles/components/Button.scss +51 -53
  93. package/src/v2/styles/form/Layout.scss +15 -0
  94. package/src/v2/styles/form/NewInput.scss +76 -53
  95. package/src/v2/styles/index.scss +1 -0
  96. package/src/v2/styles/tokens/_colors.scss +6 -6
  97. package/src/v2/styles/tokens/_typography.scss +2 -2
@@ -1,24 +1,27 @@
1
1
  /* New Form Input Styles based on Figma design tokens */
2
2
 
3
3
  .new-form-input {
4
- display: flex;
5
- flex-direction: column;
6
- gap: var(--spacing-xs, 4px);
7
- width: 100%;
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
- font-family: var(--font-family-sans, 'Geist', sans-serif);
11
- font-size: var(--text-sm-size, 13px);
12
- font-weight: var(--heading-h5-weight, 500);
13
- line-height: var(--text-sm-line, 16px);
14
- color: var(--labels-main-label-primary, #121e52);
15
- margin: 0;
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
- font-family: var(--font-family-sans, 'Geist', sans-serif);
22
+ font-family: var(--font-family-sans, 'Geist', sans-serif);
20
23
  font-size: var(--text-xs-size, 11px);
21
- font-weight: var(--heading-h6-weight, 500);
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
- &__input {
36
- font-family: var(--font-family-sans, 'Geist', sans-serif);
37
- font-size: var(--text-sm-size, 13px);
38
- line-height: var(--text-sm-line, 16px);
39
- color: var(--labels-main-label-primary, #121e52);
40
- background-color: var(--surfaces-main-background-secondary, #f8f8fa);
41
- border: 2px solid var(--borders-main-border-primary, #e8e9ef);
42
- border-radius: var(--radius-md, 4px);
43
- padding: 8px 10px;
44
- height: 40px;
45
- width: 100%;
46
- transition: all 0.2s ease;
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
- &:focus {
49
- outline: none;
50
- border-color: var(--borders-main-border-selected, #121e52);
51
- background-color: var(--surfaces-main-background-secondary, #f8f8fa);
52
- }
52
+ @media (max-width: 768px) {
53
+ font-size: 16px;
54
+ }
53
55
 
54
- &::placeholder {
55
- color: var(--labels-main-label-secondary, #626a90);
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
- font-family: var(--font-family-sans, 'Geist', sans-serif);
61
- font-size: var(--text-sm-size, 13px);
62
- line-height: var(--text-sm-line, 16px);
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(--borders-main-border-selected, #121e52);
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-sm-size, 13px);
99
- line-height: var(--text-sm-line, 16px);
100
- color: var(--labels-main-label-primary, #121e52);
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(--borders-main-border-selected, #121e52);
153
+ border-color: var(--border-selected, #6200EE);
138
154
  }
139
155
  }
140
156
  }
141
157
 
142
158
  &__helper-text {
143
- font-family: var(--font-family-sans, 'Geist', sans-serif);
144
- font-size: var(--text-sm-size, 13px);
145
- font-weight: 400;
146
- line-height: var(--text-sm-line, 16px);
147
- color: var(--labels-main-label-secondary, #626a90);
148
- margin: 0;
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(--borders-main-border-selected, #121e52);
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
+ }
@@ -0,0 +1,6 @@
1
+ import styleInject from '/opt/atlassian/pipelines/agent/build/node_modules/style-inject/dist/style-inject.es.js';
2
+
3
+ var css_248z = ".new-form-input{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--spacing-sm);width:100%}.new-form-input__label{color:var(--label-primary,#121e52);font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:15px;font-style:normal;font-weight:600;line-height:20px}.new-form-input__label-optional{color:var(--labels-main-label-secondary,#626a90);font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:var(--text-xs-size,11px);font-weight:400;line-height:var(--text-xs-line,14px);text-align:right}.new-form-input__label-row{align-items:center;display:flex;gap:var(--spacing-reg,16px);justify-content:space-between;width:100%}.new-form-input__input{background-color:var(--surfaces-main-background-secondary);background:var(--surface-secondary);border:2px solid var(--border-primary);border-radius:var(--radius-md);flex:1 0 0;font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:var(--text-regular-size,15px);line-height:var(--text-regular-line,20px);min-height:40px;padding:8px 10px;transition:all .2s ease;width:100%}@media (max-width:768px){.new-form-input__input{font-size:16px}}.new-form-input__input:focus{background-color:var(--surfaces-main-background-secondary,#f8f8fa);border-color:var(--border-selected,#6200ee);outline:none}.new-form-input__input::placeholder{color:var(--labels-main-label-secondary,#626a90)}.new-form-input__textarea{background-color:var(--surfaces-main-background-secondary,#f8f8fa);border:1px solid var(--borders-main-border-primary,#e8e9ef);border-radius:var(--radius-md,4px);color:var(--labels-main-label-primary,#121e52);font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:var(--text-regular-size,15px);line-height:var(--text-regular-line,20px);min-height:120px;padding:8px 10px;resize:vertical;transition:all .2s ease;width:100%}@media (max-width:768px){.new-form-input__textarea{font-size:16px}}.new-form-input__textarea:focus{border-color:var(--border-selected,#6200ee);outline:none}.new-form-input__textarea::placeholder{color:var(--labels-main-label-secondary,#626a90)}.new-form-input__input-with-icon{align-items:center;background-color:var(--surfaces-main-background-secondary,#f8f8fa);border:2px solid var(--borders-main-border-primary,#e8e9ef);border-radius:var(--radius-md,4px);display:flex;gap:var(--spacing-sm,8px);min-height:40px;padding:5px}.new-form-input__input-with-icon input{background:#0000;border:none;color:var(--label-primary);flex:1;font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:var(--text-regular-size,15px);line-height:var(--text-regular-line,20px)}@media (max-width:768px){.new-form-input__input-with-icon input{font-size:16px}}.new-form-input__input-with-icon input:focus{outline:none}.new-form-input__input-with-icon input::placeholder{color:var(--labels-main-label-secondary,#626a90)}.new-form-input__input-with-icon .icon{flex-shrink:0;height:22px;width:22px}.new-form-input__verification-code{display:flex;gap:var(--spacing-sm,8px);height:62px}.new-form-input__verification-code .code-input{background-color:var(--surfaces-main-background-secondary,#f8f8fa);border:2px solid var(--borders-main-border-primary,#e8e9ef);border-radius:var(--radius-md,4px);color:var(--labels-main-label-primary,#121e52);flex:1;font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:var(--text-lg-size,18px);font-weight:var(--heading-h3-weight,600);text-align:center;transition:all .2s ease}.new-form-input__verification-code .code-input:focus{border-color:var(--border-selected,#6200ee);outline:none}.new-form-input__helper-text{color:var(--label-secondary,#626a90);font-size:var(--text-regular-size,15px);line-height:var(--text-regular-line,20px)}.new-form-input__error-text,.new-form-input__helper-text{font-family:var(--font-family-sans,\"Geist\",sans-serif);font-style:normal;font-weight:400;margin-top:2px}.new-form-input__error-text{color:var(--labels-status-label-error,#ef4444);font-size:11px;line-height:14px}.new-form-input--active .new-form-input__input{border-color:var(--border-selected,#6200ee)}.new-form-input--error .new-form-input__input{border-color:var(--borders-status-border-error,#ef4444)}.new-form-input--disabled{opacity:var(--opacity-50,.5);pointer-events:none}";
4
+ styleInject(css_248z);
5
+
6
+ export { css_248z as default };
@@ -2,3 +2,4 @@
2
2
  @import './tokens/sizes';
3
3
  @import './tokens/status';
4
4
  @import './tokens/typography';
5
+ @import './form/Layout';
@@ -5,7 +5,7 @@
5
5
 
6
6
  :root {
7
7
  /* Base Colors - BKIT */
8
-
8
+
9
9
  /* Blues */
10
10
  --blue-50: #E7F4FC;
11
11
  --blue-100: #B4DBF6;
@@ -144,7 +144,7 @@
144
144
  --neutral-black: #000000;
145
145
 
146
146
  /* Main Color Abstractions */
147
-
147
+
148
148
  /* Purple Scale */
149
149
  --purple-lightest: var(--purple-50);
150
150
  --purple-lighter: var(--purple-100);
@@ -253,7 +253,7 @@
253
253
  --shade-darkest: var(--neutral-black);
254
254
 
255
255
  /* Semantic Colors */
256
-
256
+
257
257
  /* Highlight Colors */
258
258
  --highlight-lightest: var(--cyan-lightest);
259
259
  --highlight-lighter: var(--cyan-lighter);
@@ -326,7 +326,7 @@
326
326
  --disabled-darkest: var(--shade-regular);
327
327
 
328
328
  /* Light Theme Palette Mappings */
329
-
329
+
330
330
  /* Labels */
331
331
  --label-primary: var(--shade-light);
332
332
  --label-secondary: var(--tone-darkest);
@@ -387,7 +387,7 @@
387
387
  /* Borders */
388
388
  --border-primary: var(--tone-light);
389
389
  --border-secondary: var(--tone-regular);
390
- --border-selected: var(--shade-light);
390
+ --border-selected: var(--neutral-600);
391
391
  --border-action: var(--actions-regular);
392
392
  --border-status-error: var(--errors-lighter);
393
393
  --border-status-success: var(--success-lighter);
@@ -551,4 +551,4 @@
551
551
 
552
552
  @mixin color-border($color) {
553
553
  border-color: var(--#{$color});
554
- }
554
+ }
@@ -7,7 +7,7 @@
7
7
  --font-family-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
8
8
  --font-family-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
9
9
 
10
- /* Headings Desktop */
10
+ /* Headings Desktop */
11
11
  --heading-xxl-size: 44px;
12
12
  --heading-xxl-line: 48px;
13
13
  --heading-xxl-weight: 600;
@@ -143,4 +143,4 @@ $typo-map: (
143
143
  @media (max-width: $bp-mobile-max) {
144
144
  @include typography($mobileVariant);
145
145
  }
146
- }
146
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.78.5-dev.41",
3
+ "version": "0.78.5-dev.45",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/bookedit-licklist/licklist_design.git"
@@ -42,7 +42,7 @@
42
42
  ]
43
43
  },
44
44
  "peerDependencies": {
45
- "@licklist/core": "0.36.1-dev.10",
45
+ "@licklist/core": "0.36.1-dev.12",
46
46
  "@licklist/eslint-config": "0.5.6",
47
47
  "@licklist/plugins": "0.36.4-dev.13",
48
48
  "clsx": "2.1.1",
@@ -64,7 +64,7 @@
64
64
  "@dnd-kit/utilities": "2.0.0",
65
65
  "@fortawesome/fontawesome-svg-core": "1.2.34",
66
66
  "@fortawesome/free-solid-svg-icons": "5.15.2",
67
- "@licklist/core": "0.36.1-dev.10",
67
+ "@licklist/core": "0.36.1-dev.12",
68
68
  "@licklist/eslint-config": "0.5.6",
69
69
  "@licklist/plugins": "0.36.4-dev.13",
70
70
  "@mantine/core": "6.0.22",
package/src/index.ts CHANGED
@@ -48,3 +48,4 @@ export * from './PageNotFound'
48
48
  export * from './UnderMaintenance'
49
49
  export * from './v2/dashboard-analytics'
50
50
  export * from './v2/navigation/DashboardLayout'
51
+ export * from './v2/components'
@@ -1,4 +1,4 @@
1
- @import '../../../styles/overrides/functions';
1
+ @import '../../styles/index.scss';
2
2
 
3
3
  .alert {
4
4
  background: var(--surfaces-status-background-success, #eef9ea);
@@ -133,7 +133,7 @@
133
133
  gap: 8px;
134
134
  align-items: center;
135
135
  cursor: pointer;
136
-
136
+
137
137
  &:hover {
138
138
  opacity: 0.8;
139
139
  }
@@ -172,7 +172,7 @@
172
172
  align-items: center;
173
173
  justify-content: center;
174
174
  transition: opacity 0.2s ease;
175
-
175
+
176
176
  &:hover {
177
177
  opacity: 0.7;
178
178
  }
@@ -1,19 +1,18 @@
1
- import React, { HTMLAttributes } from 'react'
1
+ import { ButtonHTMLAttributes } from 'react'
2
2
  import './Button.scss'
3
3
 
4
- export interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {
4
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
5
  variant?: 'primary' | 'primary-soft' | 'primary-outline' | 'secondary' | 'destructive-soft' | 'destructive-strong' | 'info' | 'disabled'
6
6
  size?: 'sm' | 'md' | 'lg'
7
- disabled?: boolean
8
7
  }
9
8
 
10
- export function Button({
11
- variant = 'primary',
12
- size = 'md',
13
- disabled = false,
9
+ export function Button({
10
+ variant = 'primary',
11
+ size = 'md',
12
+ disabled = false,
14
13
  className = '',
15
14
  children,
16
- ...props
15
+ ...props
17
16
  }: ButtonProps) {
18
17
  const classes = [
19
18
  'new-button',
@@ -22,16 +21,39 @@ export function Button({
22
21
  className
23
22
  ].filter(Boolean).join(' ')
24
23
 
24
+ const content = typeof children === 'string' ? (
25
+ <span className="new-button__text">{children}</span>
26
+ ) : children
27
+
25
28
  return (
26
- <button
27
- className={classes}
29
+ <button
30
+ className={classes}
28
31
  disabled={disabled}
29
32
  {...props}
30
33
  >
31
- {children}
34
+ {content}
32
35
  </button>
33
36
  )
34
37
  }
35
38
 
36
- export default Button
39
+ export interface ButtonTextProps {
40
+ children: React.ReactNode
41
+ className?: string
42
+ color?: 'primary' | 'secondary' | 'danger' | 'white' | 'action'
43
+ }
44
+
45
+ export function ButtonText({ children, className = '', color }: ButtonTextProps) {
46
+ const classes = [
47
+ 'new-button__text',
48
+ color ? `new-button__text--${color}` : '',
49
+ className
50
+ ].filter(Boolean).join(' ')
51
+
52
+ return (
53
+ <span className={classes}>
54
+ {children}
55
+ </span>
56
+ )
57
+ }
58
+
37
59
 
@@ -1,3 +1,3 @@
1
- export { Button } from './Button'
2
- export type { ButtonProps } from './Button'
1
+ export { Button, ButtonText } from './Button'
2
+ export type { ButtonProps, ButtonTextProps } from './Button'
3
3
 
@@ -0,0 +1,205 @@
1
+ @import '../../styles/index.scss';
2
+
3
+ .checkbox {
4
+ display: flex;
5
+ max-width: 500px;
6
+ align-items: flex-start;
7
+ gap: 11px;
8
+ align-self: stretch;
9
+
10
+ &__wrapper {
11
+ display: flex;
12
+ align-items: flex-start;
13
+ gap: 11px;
14
+ cursor: pointer;
15
+ user-select: none;
16
+ width: 100%;
17
+ }
18
+
19
+ &__input {
20
+ position: absolute;
21
+ opacity: 0;
22
+ cursor: pointer;
23
+ height: 0;
24
+ width: 0;
25
+
26
+ &:checked ~ .checkbox__toggle {
27
+ background: var(--fill-selected, #14215A);
28
+ border: 1px solid var(--border-primary, #E8E9EF);
29
+
30
+ .checkbox__xmark {
31
+ opacity: 0;
32
+ visibility: hidden;
33
+ }
34
+
35
+ .checkbox__checked-group {
36
+ opacity: 1;
37
+ visibility: visible;
38
+ }
39
+ }
40
+
41
+ &:focus ~ .checkbox__toggle {
42
+ box-shadow: 0 0 0 2px rgba(20, 33, 90, 0.2);
43
+ }
44
+
45
+ &:disabled ~ .checkbox__toggle {
46
+ background-color: var(--surface-status-disabled, #f8f8fa);
47
+ border-color: var(--border-primary, #e8e9ef);
48
+ cursor: not-allowed;
49
+ opacity: 0.6;
50
+ }
51
+ }
52
+
53
+ // Only show X mark when not pristine and not checked
54
+ &:not(&--pristine) &__input:not(:checked) ~ &__toggle {
55
+ .checkbox__xmark {
56
+ opacity: 1;
57
+ visibility: visible;
58
+ top: 50%;
59
+ position: absolute;
60
+ right: 4px;
61
+ transform: translateY(-50%);
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ }
66
+
67
+ .checkbox__checked-group {
68
+ opacity: 0;
69
+ visibility: hidden;
70
+ }
71
+ }
72
+
73
+ &__toggle {
74
+ position: relative;
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: flex-end; // Positions X mark to the right
78
+ width: 58px;
79
+ height: 34px; // Set explicit height to help with vertical centering
80
+ min-width: 58px;
81
+ padding: 4px;
82
+ background: var(--surface-secondary, #F8F8FA);
83
+ border: 1px solid var(--border-primary, #E8E9EF);
84
+ border-radius: var(--padding-xl, 32px);
85
+ flex-shrink: 0;
86
+ }
87
+
88
+ &__xmark {
89
+ width: 24px;
90
+ height: 24px;
91
+ opacity: 0; // Hidden by default (blank state)
92
+ visibility: hidden;
93
+
94
+ svg {
95
+ width: 100%;
96
+ height: 100%;
97
+ }
98
+ }
99
+
100
+ &__checked-group {
101
+ position: absolute;
102
+ left: 4px;
103
+ top: 50%;
104
+ transform: translateY(-50%);
105
+ width: 24px;
106
+ height: 24px;
107
+ opacity: 0;
108
+ visibility: hidden;
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ }
113
+
114
+ &__circle {
115
+ position: relative;
116
+ width: 24px;
117
+ height: 24px;
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+
122
+ svg {
123
+ width: 100%;
124
+ height: 100%;
125
+ }
126
+ }
127
+
128
+ &__checkmark {
129
+ position: absolute;
130
+ top: 50%;
131
+ left: 50%;
132
+ transform: translate(-50%, -50%);
133
+ width: 24px;
134
+ height: 24px;
135
+ display: flex;
136
+ align-items: center;
137
+ justify-content: center;
138
+
139
+ svg {
140
+ width: 100%;
141
+ height: 100%;
142
+ }
143
+ }
144
+
145
+ &__content {
146
+ display: flex;
147
+ flex-direction: column;
148
+ gap: 4px;
149
+ flex: 1;
150
+ }
151
+
152
+ &__label {
153
+ font-family: var(--font-family-sans, 'Geist', sans-serif), serif;
154
+ color: var(--label-primary);
155
+ font-size: 15px;
156
+ font-style: normal;
157
+ font-weight: 600;
158
+ line-height: 20px;
159
+ }
160
+
161
+ &__description {
162
+ color: var(--label-secondary);
163
+ font-family: var(--font-family-sans, 'Geist', sans-serif), serif;
164
+ font-size: var(--text-regular-size, 15px);
165
+ font-style: normal;
166
+ font-weight: 400;
167
+ line-height: var(--text-regular-line, 20px);
168
+ }
169
+
170
+ &__error-text {
171
+ font-family: var(--font-family-sans, 'Geist', sans-serif), serif;
172
+ font-size: var(--text-xs-size, 11px);
173
+ line-height: var(--text-xs-line, 14px);
174
+ color: var(--label-status-error, #ef4444);
175
+ margin-left: 69px;
176
+ }
177
+
178
+ &__wrapper:hover &__input:not(:disabled) ~ &__toggle {
179
+ border-color: var(--border-primary-hover, #d1d3de);
180
+ }
181
+
182
+ &--pristine {
183
+ .checkbox__toggle {
184
+ background: var(--surface-secondary, #F8F8FA);
185
+ }
186
+ .checkbox__xmark,
187
+ .checkbox__checked-group {
188
+ opacity: 0 !important;
189
+ visibility: hidden !important;
190
+ }
191
+ }
192
+ }
193
+
194
+ .checkbox-pristine-wrapper {
195
+ display: flex;
196
+ width: 58px;
197
+ padding: 4px;
198
+ justify-content: flex-end;
199
+ align-items: center;
200
+ gap: 8px;
201
+ border-radius: var(--padding-xl, 32px);
202
+ border: 1px solid var(--border-primary, #E8E9EF);
203
+ background: var(--surface-primary, #FFF);
204
+ }
205
+