@nattstack/ui 0.0.1
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/button-spinner.module-T3OGVJS4.module.css +95 -0
- package/dist/button.module-77AJOXGM.module.css +209 -0
- package/dist/column.module-A7QCVPFC.module.css +4 -0
- package/dist/index.d.ts +250 -0
- package/dist/index.js +715 -0
- package/dist/input.module-DOM3NIU5.module.css +101 -0
- package/dist/label.module-HUBUIUFV.module.css +9 -0
- package/dist/row.module-GYNANRAY.module.css +4 -0
- package/dist/spacer.module-ZYYYWYEB.module.css +3 -0
- package/dist/switch.module-TLJBHCSA.module.css +62 -0
- package/dist/tabs-panel.module-VGH3G3KV.module.css +12 -0
- package/dist/tabs-pill-indicator.module-533HMO7L.module.css +12 -0
- package/dist/tabs-pill-list.module-KQW67ZSW.module.css +7 -0
- package/dist/tabs-pill-tab.module-M5YIWTWX.module.css +57 -0
- package/dist/tabs-segmented-indicator.module-MB5GZJGW.module.css +12 -0
- package/dist/tabs-segmented-list.module-I3DSVFSP.module.css +11 -0
- package/dist/tabs-segmented-tab.module-GFCOY63Z.module.css +29 -0
- package/dist/tabs-underline-indicator.module-6SHQHUH5.module.css +10 -0
- package/dist/tabs-underline-list.module-72ZCIEAS.module.css +8 -0
- package/dist/tabs-underline-tab.module-YGSM4IUK.module.css +28 -0
- package/dist/tabs.module-3Z5DRPPX.module.css +5 -0
- package/dist/textarea.module-6GUVSFC7.module.css +9 -0
- package/dist/tooltip-content.module-5MWTMSBY.module.css +13 -0
- package/package.json +58 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* ===================================================== */
|
|
2
|
+
/* Base */
|
|
3
|
+
/* ===================================================== */
|
|
4
|
+
.input {
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-height: var(--height);
|
|
7
|
+
padding: 0 12px;
|
|
8
|
+
font-family: var(--font-sans, sans-serif);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
color: var(--color-gray-12, #202020);
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
appearance: none;
|
|
15
|
+
cursor: text;
|
|
16
|
+
outline-width: 2px;
|
|
17
|
+
outline-style: solid;
|
|
18
|
+
outline-color: transparent;
|
|
19
|
+
outline-offset: -2px;
|
|
20
|
+
background-color: var(--color-gray-1, #fcfcfc);
|
|
21
|
+
border-style: none;
|
|
22
|
+
box-shadow: 0 0 0 1px var(--color-gray-4) inset;
|
|
23
|
+
transition-duration: 150ms;
|
|
24
|
+
transition-property: box-shadow, opacity;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.input::placeholder {
|
|
28
|
+
color: var(--color-gray-9, #8d8d8d);
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.input:disabled {
|
|
33
|
+
cursor: not-allowed;
|
|
34
|
+
opacity: 0.5;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.input:enabled:active,
|
|
38
|
+
.input:enabled:focus,
|
|
39
|
+
.input:enabled:hover,
|
|
40
|
+
.input:enabled[data-is-active="true"] {
|
|
41
|
+
box-shadow: 0 0 0 1px var(--color-gray-6) inset;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.input[data-is-valid="true"] {
|
|
45
|
+
outline-color: #30a46c;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.input[data-is-invalid="true"] {
|
|
49
|
+
outline-color: #e5484d;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Focus overrides valid and invalid */
|
|
53
|
+
.input:focus-visible {
|
|
54
|
+
outline-color: var(--color-primary-9, #e93d82);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* ===================================================== */
|
|
58
|
+
/* Password */
|
|
59
|
+
/* ===================================================== */
|
|
60
|
+
.input__password {
|
|
61
|
+
font-family: var(--font-mono, monospace);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ===================================================== */
|
|
65
|
+
/* Rounded */
|
|
66
|
+
/* ===================================================== */
|
|
67
|
+
.input__rounded_base {
|
|
68
|
+
border-radius: 14px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.input__rounded_full {
|
|
72
|
+
border-radius: 9999px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ===================================================== */
|
|
76
|
+
/* Size */
|
|
77
|
+
/* ===================================================== */
|
|
78
|
+
.input__size_32 {
|
|
79
|
+
--height: 32px;
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.input__size_36 {
|
|
84
|
+
--height: 36px;
|
|
85
|
+
border-radius: 10px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.input__size_40 {
|
|
89
|
+
--height: 40px;
|
|
90
|
+
border-radius: 12px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.input__size_44 {
|
|
94
|
+
--height: 44px;
|
|
95
|
+
border-radius: 14px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.input__size_48 {
|
|
99
|
+
--height: 48px;
|
|
100
|
+
border-radius: 16px;
|
|
101
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* ===================================================== */
|
|
2
|
+
/* Base */
|
|
3
|
+
/* ===================================================== */
|
|
4
|
+
.switch {
|
|
5
|
+
background-color: var(--color-gray-6);
|
|
6
|
+
border-radius: 9999px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
display: flex;
|
|
9
|
+
outline-color: var(--color-primary-9);
|
|
10
|
+
outline-offset: 2px;
|
|
11
|
+
outline-style: solid;
|
|
12
|
+
outline-width: 0;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
padding: 2px;
|
|
15
|
+
transition-duration: 150ms;
|
|
16
|
+
transition-property: background-color;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.switch:focus-visible {
|
|
20
|
+
outline-width: 2px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.switch[data-checked] {
|
|
24
|
+
background-color: var(--color-primary-9);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.switch[data-disabled] {
|
|
28
|
+
cursor: not-allowed;
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* ===================================================== */
|
|
33
|
+
/* Thumb */
|
|
34
|
+
/* ===================================================== */
|
|
35
|
+
|
|
36
|
+
.switch__thumb {
|
|
37
|
+
height: 100%;
|
|
38
|
+
aspect-ratio: 1 / 1;
|
|
39
|
+
background-color: var(--color-white);
|
|
40
|
+
border-radius: 9999px;
|
|
41
|
+
transition-duration: 150ms;
|
|
42
|
+
transition-property: transform;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.switch__thumb[data-checked] {
|
|
46
|
+
transform: translateX(var(--translateX));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ===================================================== */
|
|
50
|
+
/* Size */
|
|
51
|
+
/* ===================================================== */
|
|
52
|
+
.switch__size_18 {
|
|
53
|
+
--translateX: 12px;
|
|
54
|
+
width: 30px;
|
|
55
|
+
height: 18px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.switch__size_24 {
|
|
59
|
+
--translateX: 16px;
|
|
60
|
+
width: 40px;
|
|
61
|
+
height: 24px;
|
|
62
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.tabs_pill_indicator {
|
|
2
|
+
background-color: var(--color-gray-12);
|
|
3
|
+
border-radius: 12px;
|
|
4
|
+
height: var(--active-tab-height);
|
|
5
|
+
left: var(--active-tab-left);
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: var(--active-tab-top);
|
|
8
|
+
transition-duration: 150ms;
|
|
9
|
+
transition-property: left, width;
|
|
10
|
+
width: var(--active-tab-width);
|
|
11
|
+
z-index: -1;
|
|
12
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.tabs_pill_tab {
|
|
2
|
+
align-items: center;
|
|
3
|
+
border-radius: var(--border-radius);
|
|
4
|
+
color: var(--color-black);
|
|
5
|
+
column-gap: 8px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
height: 40px;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
outline-color: var(--color-primary-9);
|
|
14
|
+
outline-offset: -4px;
|
|
15
|
+
outline-style: solid;
|
|
16
|
+
outline-width: 0px;
|
|
17
|
+
padding: 0 14px;
|
|
18
|
+
transition-duration: 150ms;
|
|
19
|
+
transition-property: background-color, color;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tabs_pill_tab:focus-visible {
|
|
23
|
+
outline-width: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.tabs_pill_tab:hover {
|
|
27
|
+
background-color: var(--color-gray-4);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.tabs_pill_tab[data-active] {
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
color: var(--color-white);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:global(.dark) .tabs_pill_tab {
|
|
36
|
+
color: var(--color-white);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:global(.dark) .tabs_pill_tab[data-active] {
|
|
40
|
+
color: var(--color-black);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tabs_pill_tab_wrapper {
|
|
44
|
+
--border-radius: 12px;
|
|
45
|
+
border-radius: var(--border-radius);
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tabs_pill_tab_background {
|
|
53
|
+
background-color: var(--color-gray-3);
|
|
54
|
+
inset: 0;
|
|
55
|
+
position: absolute;
|
|
56
|
+
z-index: -2;
|
|
57
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.tabs_segmented_indicator {
|
|
2
|
+
background-color: var(--color-gray-1);
|
|
3
|
+
border-radius: 12px;
|
|
4
|
+
height: var(--active-tab-height);
|
|
5
|
+
left: var(--active-tab-left);
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: var(--active-tab-top);
|
|
8
|
+
transition-duration: 150ms;
|
|
9
|
+
transition-property: left, width;
|
|
10
|
+
width: var(--active-tab-width);
|
|
11
|
+
z-index: -1;
|
|
12
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.tabs_segmented_tab {
|
|
2
|
+
align-items: center;
|
|
3
|
+
border-radius: 10px;
|
|
4
|
+
color: var(--color-gray-11);
|
|
5
|
+
column-gap: 8px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
height: 100%;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
outline-color: var(--color-primary-9);
|
|
14
|
+
outline-offset: -4px;
|
|
15
|
+
outline-style: solid;
|
|
16
|
+
outline-width: 0px;
|
|
17
|
+
padding: 0 14px;
|
|
18
|
+
transition-duration: 150ms;
|
|
19
|
+
transition-property: color;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tabs_segmented_tab:focus-visible {
|
|
23
|
+
outline-width: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.tabs_segmented_tab:hover,
|
|
27
|
+
.tabs_segmented_tab[data-active] {
|
|
28
|
+
color: var(--color-gray-12);
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.tabs_underline_tab {
|
|
2
|
+
align-items: center;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
color: var(--color-gray-11);
|
|
5
|
+
column-gap: 8px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
margin-bottom: 6px;
|
|
12
|
+
outline-color: var(--color-primary-9);
|
|
13
|
+
outline-offset: -2px;
|
|
14
|
+
outline-style: solid;
|
|
15
|
+
outline-width: 0px;
|
|
16
|
+
padding: 6px 12px;
|
|
17
|
+
transition-duration: 150ms;
|
|
18
|
+
transition-property: color;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.tabs_underline_tab:focus-visible {
|
|
22
|
+
outline-width: 2px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tabs_underline_tab:hover,
|
|
26
|
+
.tabs_underline_tab[data-active] {
|
|
27
|
+
color: var(--color-gray-12);
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.tooltip_content {
|
|
2
|
+
background-color: var(--color-gray-1);
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
border: 1px solid var(--color-gray-4);
|
|
5
|
+
color: var(--color-gray-12);
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
padding: 4px 8px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.tooltip_content_positioner {
|
|
11
|
+
isolation: isolate;
|
|
12
|
+
z-index: 50;
|
|
13
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nattstack/ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A collection of reusable React components built with Base UI, TypeScript, and CSS Modules",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"components",
|
|
7
|
+
"react",
|
|
8
|
+
"ui"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/nattstack/ui#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/nattstack/ui/issues"
|
|
13
|
+
},
|
|
14
|
+
"author": "Natt <hello@natt.sh> (https://natt.sh)",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/nattstack/ui.git"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"module": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./colors": "./src/colors/index.css",
|
|
32
|
+
"./tailwind-colors": "./src/tailwind-colors/index.css",
|
|
33
|
+
"./tailwind-tokenless-10": "./src/tailwind-tokenless/10/index.css",
|
|
34
|
+
"./tailwind-tokenless-16": "./src/tailwind-tokenless/16/index.css"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsup",
|
|
41
|
+
"check:type": "tsc",
|
|
42
|
+
"dev": "tsup --watch",
|
|
43
|
+
"prepublishOnly": "bun run build",
|
|
44
|
+
"release": "bun publish"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@base-ui/react": "1.3.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/react": "19.2.14",
|
|
51
|
+
"tsup": "8.5.1",
|
|
52
|
+
"typescript": "5.9.3"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
56
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
57
|
+
}
|
|
58
|
+
}
|