@akad/design-system 1.1.1 → 1.1.3

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 (29) hide show
  1. package/css/core.css +1 -1
  2. package/package.json +1 -1
  3. package/react/react-lib.js +2492 -2245
  4. package/react/react-lib.umd.cjs +5 -5
  5. package/react/src/components/atoms/Chip/Chip.config.d.ts +43 -0
  6. package/react/src/components/atoms/Chip/Chip.d.ts +15 -0
  7. package/react/src/components/atoms/Chip/Chip.stories.d.ts +33 -0
  8. package/react/src/components/atoms/Chip/Chip.test.d.ts +1 -0
  9. package/react/src/components/atoms/Chip/index.d.ts +4 -0
  10. package/react/src/components/atoms/Radio/Radio.config.d.ts +21 -0
  11. package/react/src/components/atoms/Radio/Radio.d.ts +13 -0
  12. package/react/src/components/atoms/Radio/Radio.stories.d.ts +49 -0
  13. package/react/src/components/atoms/Radio/Radio.test.d.ts +1 -0
  14. package/react/src/components/atoms/Radio/index.d.ts +4 -0
  15. package/react/src/components/index.d.ts +2 -0
  16. package/react/src/components/molecules/EditableSelect/EditableSelect.config.d.ts +5 -0
  17. package/react/src/components/molecules/EditableSelect/EditableSelect.d.ts +63 -2
  18. package/react/src/components/molecules/Tabs/Tab.d.ts +2 -2
  19. package/react/src/components/molecules/Tabs/Tabs.config.d.ts +10 -0
  20. package/react/src/components/molecules/Tabs/Tabs.d.ts +7 -11
  21. package/react/src/components/molecules/Tabs/Tabs.stories.d.ts +16 -0
  22. package/react/src/components/molecules/Tabs/index.d.ts +1 -0
  23. package/react/src/components/molecules/Tabs/types.d.ts +23 -0
  24. package/scss/core/components/atoms/chip.scss +101 -0
  25. package/scss/core/components/atoms/radio-card.scss +117 -0
  26. package/scss/core/components/atoms/radio.scss +140 -0
  27. package/scss/core/components/index.scss +2 -0
  28. package/scss/core/components/molecules/editable-select.scss +4 -0
  29. package/scss/core/components/molecules/tabs.scss +153 -0
@@ -0,0 +1,140 @@
1
+ @import 'radio-card';
2
+
3
+ $radio__control-size: 20px !default;
4
+ $radio__control-dot-size: 10px !default;
5
+ $radio__control-color: var(--color__neutral--80) !default;
6
+
7
+ .ds-radio {
8
+ --radio__control-color: #{$radio__control-color};
9
+
10
+ &__input {
11
+ appearance: none;
12
+ cursor: pointer;
13
+ margin: 0;
14
+ opacity: 0;
15
+ position: absolute;
16
+
17
+ &:disabled {
18
+ cursor: not-allowed;
19
+ }
20
+ }
21
+
22
+ &__control {
23
+ border: $border__width--thin solid var(--radio__control-color);
24
+ border-radius: 50%;
25
+ box-sizing: border-box;
26
+ flex-shrink: 0;
27
+ height: $radio__control-size;
28
+ pointer-events: none;
29
+ position: relative;
30
+ width: $radio__control-size;
31
+ z-index: 0;
32
+ }
33
+
34
+ &__input:checked + &__control::after {
35
+ background-color: var(--radio__control-color);
36
+ border-radius: 50%;
37
+ content: '';
38
+ height: $radio__control-dot-size;
39
+ left: 50%;
40
+ position: absolute;
41
+ top: 50%;
42
+ transform: translate(-50%, -50%);
43
+ width: $radio__control-dot-size;
44
+ }
45
+
46
+ &__text {
47
+ @include radio-card-text-block;
48
+ }
49
+
50
+ &__label,
51
+ &__description {
52
+ color: var(--color__neutral--80);
53
+ font-family: var(--font__family--base);
54
+ font-size: $font__size--sm;
55
+ font-style: normal;
56
+ line-height: 1.5;
57
+ }
58
+
59
+ &__label {
60
+ font-weight: $font__weight--bold;
61
+ }
62
+
63
+ &__description {
64
+ font-weight: $font__weight--regular;
65
+ }
66
+
67
+ &--disabled {
68
+ cursor: not-allowed;
69
+ opacity: 0.55;
70
+ }
71
+
72
+ &--full-width {
73
+ flex: 1 1 0;
74
+ width: 100%;
75
+ }
76
+
77
+ &--default {
78
+ align-items: center;
79
+ cursor: pointer;
80
+ display: inline-flex;
81
+ gap: $spacing--xxxs;
82
+ position: relative;
83
+ width: fit-content;
84
+
85
+ .ds-radio__input {
86
+ height: $radio__control-size;
87
+ width: $radio__control-size;
88
+ }
89
+ }
90
+
91
+ &--card {
92
+ @include radio-card-wrapper;
93
+
94
+ &:has(.ds-radio__input:checked) {
95
+ @include radio-card-wrapper-checked;
96
+ }
97
+
98
+ &:has(.ds-radio__input:focus-visible) {
99
+ @include radio-card-wrapper-focus-visible;
100
+ }
101
+
102
+ &.ds-radio--disabled {
103
+ @include radio-card-wrapper-disabled;
104
+ }
105
+
106
+ &.ds-radio--full-width {
107
+ width: 100%;
108
+ }
109
+
110
+ .ds-radio__input {
111
+ @include radio-card-input-hidden;
112
+ }
113
+
114
+ .ds-radio__label,
115
+ .ds-radio__description {
116
+ @include radio-card-text-style;
117
+ }
118
+ }
119
+ }
120
+
121
+ [data-theme='dark'] .ds-radio {
122
+ --radio__control-color: var(--color__neutral--10);
123
+
124
+ .ds-radio__label,
125
+ .ds-radio__description {
126
+ color: var(--color__neutral--10);
127
+ }
128
+
129
+ &.ds-radio--card {
130
+ @include radio-card-dark-mode;
131
+
132
+ &:has(.ds-radio__input:checked) {
133
+ @include radio-card-dark-mode-checked;
134
+ }
135
+
136
+ &:has(.ds-radio__input:focus-visible) {
137
+ @include radio-card-dark-mode-focus-visible;
138
+ }
139
+ }
140
+ }
@@ -13,6 +13,7 @@
13
13
  @import 'atoms/card';
14
14
  @import 'atoms/caption';
15
15
  @import 'atoms/checkbox';
16
+ @import 'atoms/chip';
16
17
  @import 'atoms/heading';
17
18
  @import 'atoms/horizontal-rule';
18
19
  @import 'atoms/icon';
@@ -21,6 +22,7 @@
21
22
  @import 'atoms/option';
22
23
  @import 'atoms/paragraph';
23
24
  @import 'atoms/progress';
25
+ @import 'atoms/radio';
24
26
  @import 'atoms/select';
25
27
  @import 'atoms/subtitle';
26
28
  @import 'atoms/textarea';
@@ -105,6 +105,10 @@
105
105
  text-align: left;
106
106
  width: 100%;
107
107
 
108
+ &--selected {
109
+ background-color: var(--color__neutral--30);
110
+ }
111
+
108
112
  &:hover {
109
113
  background-color: var(--color__info);
110
114
  color: var(--color__neutral--00);
@@ -112,3 +112,156 @@ $tabs__padding-title: $spacing__inset--xs !default;
112
112
  --tabs__color-title--active: var(--color__primary);
113
113
  --tabs__color-title--disabled: var(--color__neutral--50);
114
114
  }
115
+
116
+ // === NAVIGATION VARIANT (ex‑TabBar: sublinhado, tablist WAI‑ARIA) ===
117
+ $tabs-nav__indicator-height: 3px !default;
118
+ $tabs-nav__padding-top: 16px !default;
119
+ $tabs-nav__padding-bottom: 13px !default;
120
+ $tabs-nav__padding-x: 24px !default;
121
+ $tabs-nav__gap: 0 !default;
122
+ $tabs-nav__panel-padding-top: $spacing__inset--sm !default;
123
+ $tabs-nav__label-color: var(--color__neutral--70) !default;
124
+ $tabs-nav__active-color: var(--color__primary) !default;
125
+
126
+ .ds-tabs.ds-tabs--navigation {
127
+ --tabs-nav__track: var(--color__neutral--40);
128
+ --tabs-nav__label: #{$tabs-nav__label-color};
129
+ --tabs-nav__label--active: #{$tabs-nav__active-color};
130
+ --tabs-nav__indicator: #{$tabs-nav__active-color};
131
+
132
+ font-family: var(--font__family--base);
133
+ width: 100%;
134
+
135
+ .ds-tabs__header {
136
+ align-items: flex-end;
137
+ background-color: transparent;
138
+ border-bottom: 1px solid var(--tabs-nav__track);
139
+ display: flex;
140
+ flex-flow: row nowrap;
141
+ gap: $tabs-nav__gap;
142
+ justify-content: flex-start;
143
+ width: 100%;
144
+ }
145
+
146
+ .ds-tabs__tab {
147
+ background: transparent;
148
+ border: none;
149
+ border-top: none;
150
+ box-sizing: border-box;
151
+ color: var(--tabs-nav__label);
152
+ cursor: pointer;
153
+ flex: 0 0 auto;
154
+ flex-grow: 0;
155
+ font-family: var(--font__family--base);
156
+ font-size: $font__size--md;
157
+ font-style: normal;
158
+ font-weight: $font__weight--bold;
159
+ letter-spacing: 0;
160
+ line-height: 1.5;
161
+ margin: 0;
162
+ max-width: 100%;
163
+ padding: $tabs-nav__padding-top $tabs-nav__padding-x
164
+ calc($tabs-nav__padding-bottom + $tabs-nav__indicator-height);
165
+ position: relative;
166
+ text-align: center;
167
+ width: auto;
168
+
169
+ .ds-icon {
170
+ color: inherit;
171
+ }
172
+
173
+ &:focus-visible {
174
+ outline: 2px solid var(--tabs-nav__label--active);
175
+ outline-offset: 4px;
176
+ }
177
+
178
+ &:hover:not(:disabled, .ds-tabs__tab--disabled) {
179
+ background: transparent;
180
+ border-top: none;
181
+ color: var(--tabs-nav__label--active);
182
+ padding-top: $tabs-nav__padding-top;
183
+ }
184
+
185
+ &-color--primary {
186
+ --tabs-nav__label--active: #{$tabs-nav__active-color};
187
+ --tabs-nav__indicator: #{$tabs-nav__active-color};
188
+ }
189
+
190
+ &-color--secondary {
191
+ --tabs-nav__label--active: var(--color__secondary);
192
+ --tabs-nav__indicator: var(--color__secondary);
193
+ }
194
+
195
+ &-color--neutral {
196
+ --tabs-nav__label--active: var(--color__neutral--70);
197
+ --tabs-nav__indicator: var(--color__neutral--50);
198
+ }
199
+
200
+ &-color--success {
201
+ --tabs-nav__label--active: var(--color__success);
202
+ --tabs-nav__indicator: var(--color__success);
203
+ }
204
+
205
+ &-color--warning {
206
+ --tabs-nav__label--active: var(--color__warning);
207
+ --tabs-nav__indicator: var(--color__warning);
208
+ }
209
+
210
+ &-color--danger {
211
+ --tabs-nav__label--active: var(--color__danger);
212
+ --tabs-nav__indicator: var(--color__danger);
213
+ }
214
+
215
+ &-color--info {
216
+ --tabs-nav__label--active: var(--color__info);
217
+ --tabs-nav__indicator: var(--color__info);
218
+ }
219
+
220
+ &--active {
221
+ background: transparent;
222
+ border-top: none;
223
+ color: var(--tabs-nav__label--active);
224
+ padding-top: $tabs-nav__padding-top;
225
+
226
+ &::after {
227
+ background-color: var(--tabs-nav__indicator);
228
+ bottom: -1px;
229
+ content: '';
230
+ height: $tabs-nav__indicator-height;
231
+ left: 0;
232
+ position: absolute;
233
+ right: 0;
234
+ }
235
+
236
+ .ds-icon {
237
+ color: inherit;
238
+ }
239
+ }
240
+
241
+ &--disabled,
242
+ &:disabled {
243
+ background: transparent !important;
244
+ border: none !important;
245
+ color: var(--color__neutral--50) !important;
246
+ cursor: not-allowed;
247
+ padding-top: $tabs-nav__padding-top !important;
248
+ pointer-events: none;
249
+ }
250
+ }
251
+
252
+ .ds-tabs__panel {
253
+ padding: $tabs-nav__panel-padding-top $tabs-nav__padding-x;
254
+ width: 100%;
255
+
256
+ .ds-wrapper {
257
+ display: block;
258
+ }
259
+ }
260
+ }
261
+
262
+ [data-theme='dark'] .ds-tabs.ds-tabs--navigation {
263
+ --tabs-nav__track: var(--color__neutral--60);
264
+ --tabs-nav__label: var(--color__neutral--20);
265
+ --tabs-nav__label--active: #{$tabs-nav__active-color};
266
+ --tabs-nav__indicator: #{$tabs-nav__active-color};
267
+ }