@gbgr/react 0.1.0
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/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/accordion/Accordion.d.ts +27 -0
- package/dist/accordion/Accordion.d.ts.map +1 -0
- package/dist/accordion/Accordion.js +66 -0
- package/dist/button/Button.d.ts +21 -0
- package/dist/button/Button.d.ts.map +1 -0
- package/dist/button/Button.js +26 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/mode-toggle/ModeToggle.d.ts +13 -0
- package/dist/mode-toggle/ModeToggle.d.ts.map +1 -0
- package/dist/mode-toggle/ModeToggle.js +11 -0
- package/dist/text-field/TextField.d.ts +21 -0
- package/dist/text-field/TextField.d.ts.map +1 -0
- package/dist/text-field/TextField.js +35 -0
- package/package.json +45 -0
- package/src/accordion/Accordion.tsx +207 -0
- package/src/accordion/accordion.css +178 -0
- package/src/button/Button.tsx +81 -0
- package/src/button/button.css +140 -0
- package/src/index.ts +25 -0
- package/src/mode-toggle/ModeToggle.tsx +51 -0
- package/src/mode-toggle/mode-toggle.css +92 -0
- package/src/styles.css +4 -0
- package/src/text-field/TextField.tsx +121 -0
- package/src/text-field/text-field.css +108 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.gbgr-text-field {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--spacing-1);
|
|
4
|
+
color: var(--text-default);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.gbgr-text-field__control {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: var(--spacing-2);
|
|
12
|
+
min-height: 60px;
|
|
13
|
+
padding: 0 var(--spacing-5);
|
|
14
|
+
border-radius: var(--radius-full);
|
|
15
|
+
border: 1px solid var(--border-depth2);
|
|
16
|
+
background: var(--color-neutral-white);
|
|
17
|
+
transition: border-color 120ms ease;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.gbgr-text-field__control:focus-within {
|
|
21
|
+
border-color: var(--border-active);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.gbgr-text-field[data-state="success"] .gbgr-text-field__control {
|
|
25
|
+
border-color: var(--color-semantic-notification-success);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.gbgr-text-field[data-state="error"] .gbgr-text-field__control {
|
|
29
|
+
border-color: var(--color-semantic-notification-error);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.gbgr-text-field__input {
|
|
33
|
+
flex: 1 1 auto;
|
|
34
|
+
min-width: 0;
|
|
35
|
+
border: 0;
|
|
36
|
+
background: transparent;
|
|
37
|
+
outline: none;
|
|
38
|
+
font: var(--body-md-regular);
|
|
39
|
+
color: inherit;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.gbgr-text-field__input::placeholder {
|
|
43
|
+
color: color-mix(in srgb, var(--text-default) 40%, transparent);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.gbgr-text-field__end {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
width: 24px;
|
|
51
|
+
height: 24px;
|
|
52
|
+
color: color-mix(in srgb, var(--text-default) 55%, transparent);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.gbgr-text-field__sub {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--spacing-2);
|
|
59
|
+
padding-left: var(--spacing-2);
|
|
60
|
+
font: var(--caption-sm-regular);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.gbgr-text-field[data-state="success"] .gbgr-text-field__sub {
|
|
64
|
+
color: var(--color-semantic-notification-success);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.gbgr-text-field[data-state="error"] .gbgr-text-field__sub {
|
|
68
|
+
color: var(--color-semantic-notification-error);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.gbgr-text-field__sub-icon {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
width: 16px;
|
|
74
|
+
height: 16px;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.gbgr-text-field__sub-icon svg {
|
|
80
|
+
width: 16px;
|
|
81
|
+
height: 16px;
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.gbgr-text-field__button {
|
|
86
|
+
appearance: none;
|
|
87
|
+
border: 0;
|
|
88
|
+
background: transparent;
|
|
89
|
+
padding: 0;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
color: inherit;
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
width: 24px;
|
|
96
|
+
height: 24px;
|
|
97
|
+
border-radius: 6px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.gbgr-text-field__button:focus-visible {
|
|
101
|
+
outline: 2px solid var(--border-active);
|
|
102
|
+
outline-offset: 2px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.gbgr-text-field__button:disabled {
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
opacity: 0.5;
|
|
108
|
+
}
|