barua-ui 0.2.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/README.md +107 -0
- package/css/barua.css +28 -0
- package/css/base.css +242 -0
- package/css/components/actions.css +371 -0
- package/css/components/auth.css +237 -0
- package/css/components/charts.css +370 -0
- package/css/components/content.css +802 -0
- package/css/components/control-center.css +370 -0
- package/css/components/feedback.css +364 -0
- package/css/components/forms.css +511 -0
- package/css/components/marketing.css +280 -0
- package/css/components/media.css +321 -0
- package/css/components/mobile.css +177 -0
- package/css/components/nav.css +682 -0
- package/css/components/overlays.css +574 -0
- package/css/components/productivity.css +525 -0
- package/css/components/specialized.css +367 -0
- package/css/liquid.css +213 -0
- package/css/tokens.css +365 -0
- package/css/utilities.css +507 -0
- package/dist/index.cjs +2750 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1106 -0
- package/dist/index.d.ts +1106 -0
- package/dist/index.js +2462 -0
- package/dist/index.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Barua UI — Mobile
|
|
3
|
+
Mobile Header, Mobile Navigation/Menu, Mobile Toolbar, Swipe Actions,
|
|
4
|
+
Pull to Refresh. (Bottom Sheet in overlays.css; Bottom Tab Bar in nav.css;
|
|
5
|
+
Touch Target & Safe Area in utilities.css.)
|
|
6
|
+
========================================================================== */
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
/* ---- Mobile Header (large-title collapse pattern) ------------------------- */
|
|
10
|
+
.b-mobile-header {
|
|
11
|
+
position: sticky;
|
|
12
|
+
top: 0;
|
|
13
|
+
z-index: var(--b-z-topbar);
|
|
14
|
+
background: var(--b-material-chrome-bg);
|
|
15
|
+
-webkit-backdrop-filter: var(--b-glass);
|
|
16
|
+
backdrop-filter: var(--b-glass);
|
|
17
|
+
border-bottom: 1px solid var(--b-hairline);
|
|
18
|
+
padding-top: env(safe-area-inset-top);
|
|
19
|
+
}
|
|
20
|
+
.b-mobile-header__bar {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: 1fr auto 1fr;
|
|
23
|
+
align-items: center;
|
|
24
|
+
height: var(--b-topbar-h);
|
|
25
|
+
padding-inline: var(--b-space-3);
|
|
26
|
+
}
|
|
27
|
+
.b-mobile-header__title {
|
|
28
|
+
grid-column: 2;
|
|
29
|
+
font-size: var(--b-text-body);
|
|
30
|
+
font-weight: var(--b-weight-semibold);
|
|
31
|
+
text-align: center;
|
|
32
|
+
}
|
|
33
|
+
.b-mobile-header__action--start { justify-self: start; }
|
|
34
|
+
.b-mobile-header__action--end { justify-self: end; grid-column: 3; }
|
|
35
|
+
.b-mobile-header__large-title {
|
|
36
|
+
padding: 0 var(--b-space-4) var(--b-space-2);
|
|
37
|
+
font-size: var(--b-text-large-title);
|
|
38
|
+
font-weight: var(--b-weight-bold);
|
|
39
|
+
letter-spacing: var(--b-tracking-tight);
|
|
40
|
+
}
|
|
41
|
+
.b-back-btn {
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 2px;
|
|
45
|
+
color: var(--b-color-accent-text);
|
|
46
|
+
font-size: var(--b-text-body);
|
|
47
|
+
background: none;
|
|
48
|
+
border: none;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
padding: var(--b-space-1);
|
|
51
|
+
}
|
|
52
|
+
.b-back-btn::before { content: "‹"; font-size: 1.5em; line-height: 1; }
|
|
53
|
+
|
|
54
|
+
/* Collapsing large title (NavigationStack behavior): barua.js toggles
|
|
55
|
+
.is-collapsed on scroll; the bar title fades in as the large one shrinks */
|
|
56
|
+
.b-mobile-header__title {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
transition: opacity var(--b-duration-fast) var(--b-ease-standard);
|
|
59
|
+
}
|
|
60
|
+
.b-mobile-header.is-collapsed .b-mobile-header__title { opacity: 1; }
|
|
61
|
+
.b-mobile-header__large-title {
|
|
62
|
+
transition: font-size var(--b-duration-normal) var(--b-ease-standard),
|
|
63
|
+
opacity var(--b-duration-fast) var(--b-ease-standard),
|
|
64
|
+
padding var(--b-duration-normal) var(--b-ease-standard);
|
|
65
|
+
interpolate-size: allow-keywords;
|
|
66
|
+
}
|
|
67
|
+
.b-mobile-header.is-collapsed .b-mobile-header__large-title {
|
|
68
|
+
font-size: 0px;
|
|
69
|
+
opacity: 0;
|
|
70
|
+
padding-block: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ---- Mobile Menu (full sheet list) ----------------------------------------- */
|
|
74
|
+
.b-mobile-menu {
|
|
75
|
+
list-style: none;
|
|
76
|
+
margin: 0;
|
|
77
|
+
padding: var(--b-space-2);
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
}
|
|
81
|
+
.b-mobile-menu a, .b-mobile-menu button {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: var(--b-space-3);
|
|
85
|
+
width: 100%;
|
|
86
|
+
min-height: var(--b-touch-target);
|
|
87
|
+
padding: var(--b-space-3);
|
|
88
|
+
font-size: var(--b-text-body);
|
|
89
|
+
font-weight: var(--b-weight-medium);
|
|
90
|
+
color: var(--b-text);
|
|
91
|
+
background: none;
|
|
92
|
+
border: none;
|
|
93
|
+
border-radius: var(--b-radius-md);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
text-align: start;
|
|
96
|
+
}
|
|
97
|
+
.b-mobile-menu :is(a, button):hover { background: var(--b-fill-tertiary); text-decoration: none; }
|
|
98
|
+
.b-mobile-menu .is-active { color: var(--b-color-accent-text); background: var(--b-color-accent-soft); }
|
|
99
|
+
|
|
100
|
+
/* ---- Mobile Toolbar (bottom action bar) --------------------------------------- */
|
|
101
|
+
.b-mobile-toolbar {
|
|
102
|
+
position: fixed;
|
|
103
|
+
inset-inline: 0;
|
|
104
|
+
inset-block-end: 0;
|
|
105
|
+
z-index: var(--b-z-topbar);
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: space-around;
|
|
109
|
+
gap: var(--b-space-2);
|
|
110
|
+
padding: var(--b-space-2) var(--b-space-4);
|
|
111
|
+
padding-bottom: max(var(--b-space-2), env(safe-area-inset-bottom));
|
|
112
|
+
background: var(--b-material-chrome-bg);
|
|
113
|
+
-webkit-backdrop-filter: var(--b-glass);
|
|
114
|
+
backdrop-filter: var(--b-glass);
|
|
115
|
+
border-top: 1px solid var(--b-hairline);
|
|
116
|
+
}
|
|
117
|
+
.b-mobile-toolbar .b-icon-btn { width: var(--b-control-h-lg); height: var(--b-control-h-lg); }
|
|
118
|
+
|
|
119
|
+
/* ---- Swipe Actions --------------------------------------------------------------
|
|
120
|
+
<div class="b-swipe"> <div class="b-swipe__content">row</div>
|
|
121
|
+
<div class="b-swipe__actions">buttons</div> </div>
|
|
122
|
+
Scroll horizontally (touch) to reveal; snaps via scroll-snap.
|
|
123
|
+
----------------------------------------------------------------------------------- */
|
|
124
|
+
.b-swipe {
|
|
125
|
+
display: flex;
|
|
126
|
+
overflow-x: auto;
|
|
127
|
+
scroll-snap-type: x mandatory;
|
|
128
|
+
scrollbar-width: none;
|
|
129
|
+
border-radius: var(--b-radius-md);
|
|
130
|
+
}
|
|
131
|
+
.b-swipe::-webkit-scrollbar { display: none; }
|
|
132
|
+
.b-swipe__content {
|
|
133
|
+
flex: 0 0 100%;
|
|
134
|
+
scroll-snap-align: start;
|
|
135
|
+
background: var(--b-surface);
|
|
136
|
+
}
|
|
137
|
+
.b-swipe__actions {
|
|
138
|
+
display: flex;
|
|
139
|
+
scroll-snap-align: end;
|
|
140
|
+
}
|
|
141
|
+
.b-swipe__actions button {
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-direction: column;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
gap: 2px;
|
|
147
|
+
min-width: 4.5rem;
|
|
148
|
+
padding-inline: var(--b-space-3);
|
|
149
|
+
font-size: var(--b-text-caption);
|
|
150
|
+
font-weight: var(--b-weight-medium);
|
|
151
|
+
color: #fff;
|
|
152
|
+
background: var(--b-gray-1);
|
|
153
|
+
border: none;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
}
|
|
156
|
+
.b-swipe__actions button svg { width: 1.25rem; height: 1.25rem; }
|
|
157
|
+
.b-swipe__actions .is-flag { background: var(--b-color-orange); }
|
|
158
|
+
.b-swipe__actions .is-danger { background: var(--b-color-danger); }
|
|
159
|
+
.b-swipe__actions .is-primary { background: var(--b-color-accent); }
|
|
160
|
+
|
|
161
|
+
/* ---- Pull to Refresh (visual affordance) --------------------------------------- */
|
|
162
|
+
.b-ptr {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
gap: var(--b-space-2);
|
|
167
|
+
height: 0;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
color: var(--b-text-tertiary);
|
|
170
|
+
font-size: var(--b-text-footnote);
|
|
171
|
+
transition: height var(--b-duration-normal) var(--b-ease-spring);
|
|
172
|
+
}
|
|
173
|
+
.b-ptr.is-pulling, .b-ptr.is-refreshing { height: 3.25rem; }
|
|
174
|
+
.b-ptr__arrow { transition: rotate var(--b-duration-fast); }
|
|
175
|
+
.b-ptr.is-ready .b-ptr__arrow { rotate: 180deg; }
|
|
176
|
+
.b-ptr.is-refreshing .b-ptr__arrow { display: none; }
|
|
177
|
+
}
|