@cahyo-dimas/freeday 3.20.0 → 3.22.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/CHANGELOG.md +106 -2
- package/COMPONENTS.md +63 -3
- package/README.id.md +6 -4
- package/README.md +6 -4
- package/USAGE.md +152 -2
- package/dist/freeday.bundle.css +964 -226
- package/dist/freeday.css +80 -1
- package/dist/freeday.tokens.css +884 -225
- package/docs/agent-onboarding.md +27 -14
- package/docs/getting-started.md +4 -4
- package/package.json +2 -2
- package/src/components/actionbar.css +68 -0
- package/src/components/bottomnav.css +11 -1
- package/tokens/tokens.json +81 -46
package/dist/freeday.css
CHANGED
|
@@ -89,6 +89,75 @@ a { color: var(--color-primary-strong); }
|
|
|
89
89
|
* browser without JS, so we animate the revealed panel instead, cheap, safe, reduced-motion gated. */
|
|
90
90
|
@media (prefers-reduced-motion:no-preference){.fdy-accordion__item[open] > .fdy-accordion__panel{animation:fdy-combo-in var(--dur-base) var(--ease-standard);}}
|
|
91
91
|
|
|
92
|
+
/* Freeday. Action bar
|
|
93
|
+
*
|
|
94
|
+
* One to three actions pinned to the bottom of the screen, where a thumb reaches them on a phone:
|
|
95
|
+
* the sign-in button, approve and reject on a document, save on a long form. Before this, an app
|
|
96
|
+
* either put its primary action mid-page, where it scrolled away, or hand-wrote a fixed bar that
|
|
97
|
+
* sat on top of the bottom nav.
|
|
98
|
+
*
|
|
99
|
+
* Sticky, not fixed: the bar keeps its place in the flow, so the last row above it is never
|
|
100
|
+
* covered and the page needs no extra reservation. In a shell with a bottom nav it rests on top of
|
|
101
|
+
* the nav; anywhere else it clears the home indicator itself. */
|
|
102
|
+
.fdy-actionbar{
|
|
103
|
+
position:sticky;bottom:0;z-index:40;
|
|
104
|
+
display:flex;gap:var(--space-2);
|
|
105
|
+
padding:var(--space-3) var(--space-4);
|
|
106
|
+
padding-bottom:calc(var(--space-3) + env(safe-area-inset-bottom,0px));
|
|
107
|
+
background:var(--color-surface-raised);
|
|
108
|
+
backdrop-filter:var(--surface-filter);
|
|
109
|
+
-webkit-backdrop-filter:var(--surface-filter);
|
|
110
|
+
border-top:var(--bw) solid var(--color-border);
|
|
111
|
+
}
|
|
112
|
+
/* The buttons share the width; the primary action goes last, nearest the thumb. */
|
|
113
|
+
.fdy-actionbar > .fdy-btn{flex:1 1 0;min-width:0;}
|
|
114
|
+
/* Sticky is bounded by its parent, and `.fdy-app__main` has bottom padding that sits below the bar,
|
|
115
|
+
* so at the end of the page the bar would stop short of the edge by that padding. A negative bottom
|
|
116
|
+
* margin cancels it when the bar is the last child (no :has(), the support floor includes iOS 15).
|
|
117
|
+
* The bar may also sit one wrapper down, in a page wrapper such as `.fdy-page`. Sticky is then
|
|
118
|
+
* bounded by the wrapper, so the wrapper must be the last in-flow content of main and its content
|
|
119
|
+
* box must end where main's does: no bottom padding, border or margin of its own (`.fdy-page` has
|
|
120
|
+
* none). A closed dialog and the fixed bottom nav take no room in the flow, so they may follow it.
|
|
121
|
+
* A dialog or drawer is not a wrapper: a bar inside a modal is not offset at any depth.
|
|
122
|
+
* Values mirror app-shell.css: main's padding is --space-8, and --space-5 at max-width 720px. */
|
|
123
|
+
.fdy-app__main > .fdy-actionbar:last-child,
|
|
124
|
+
.fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{margin-bottom:calc(-1 * var(--space-8));}
|
|
125
|
+
@media (max-width:720px){
|
|
126
|
+
.fdy-app__main > .fdy-actionbar:last-child,
|
|
127
|
+
.fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{margin-bottom:calc(-1 * var(--space-5));}
|
|
128
|
+
/* On a phone the bar runs edge to edge, like the nav it rests on: inset by main's side padding
|
|
129
|
+
* it would leave a strip of scrolling content showing on either side. The same depth rule
|
|
130
|
+
* holds: a wrapper between main and the bar must add no side padding, border or margin. The
|
|
131
|
+
* landscape notch is cleared by the bar's own padding. */
|
|
132
|
+
.fdy-app__main > .fdy-actionbar,
|
|
133
|
+
.fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar{
|
|
134
|
+
margin-inline:calc(-1 * var(--space-5));
|
|
135
|
+
padding-left:calc(var(--space-4) + env(safe-area-inset-left,0px));
|
|
136
|
+
padding-right:calc(var(--space-4) + env(safe-area-inset-right,0px));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/* Above the bottom nav: --fdy-bottomnav-h is declared, and obeyed, in bottomnav.css. The nav adds
|
|
140
|
+
* the safe-area inset itself, so the bar rests on all of it and does not add the inset twice. */
|
|
141
|
+
@media (max-width:720px){
|
|
142
|
+
.fdy-app--has-bottomnav .fdy-app__main .fdy-actionbar{
|
|
143
|
+
bottom:calc(var(--fdy-bottomnav-h) + env(safe-area-inset-bottom,0px));
|
|
144
|
+
padding-bottom:var(--space-3);
|
|
145
|
+
}
|
|
146
|
+
/* A modal or drawer is its own screen: its bar sits at its own bottom, whatever the depth. */
|
|
147
|
+
.fdy-app--has-bottomnav .fdy-app__main :is(dialog, .fdy-drawer) .fdy-actionbar{
|
|
148
|
+
bottom:0;
|
|
149
|
+
padding-bottom:calc(var(--space-3) + env(safe-area-inset-bottom,0px));
|
|
150
|
+
}
|
|
151
|
+
/* In the nav shell main's padding is --space-20 + inset (bottomnav.css) and the nav is
|
|
152
|
+
* --fdy-bottomnav-h + inset tall. What must remain below the bar is exactly the nav, so the
|
|
153
|
+
* bar ends on the nav at the end of the page and is not pushed up over the last row. The
|
|
154
|
+
* insets cancel. */
|
|
155
|
+
.fdy-app--has-bottomnav .fdy-app__main > .fdy-actionbar:last-child,
|
|
156
|
+
.fdy-app--has-bottomnav .fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{
|
|
157
|
+
margin-bottom:calc(var(--fdy-bottomnav-h) - var(--space-20));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
92
161
|
/* Freeday. Alert (inline) */
|
|
93
162
|
.fdy-alert{display:flex;gap:var(--space-3);padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);border:var(--bw) solid var(--color-border);font-size:var(--text-sm);color:var(--color-text);background:var(--color-surface-2);}
|
|
94
163
|
.fdy-alert__icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;margin-top:.05rem;}
|
|
@@ -427,8 +496,16 @@ a { color: var(--color-primary-strong); }
|
|
|
427
496
|
*
|
|
428
497
|
* Deliberately NOT part of `.fdy-app`'s markup: it is `position:fixed`, so it works from
|
|
429
498
|
* anywhere inside the shell's content slot, and an application that does not want one
|
|
430
|
-
* pays nothing. `.fdy-app--has-bottomnav` on the shell is what reserves room for it
|
|
499
|
+
* pays nothing. `.fdy-app--has-bottomnav` on the shell is what reserves room for it and states
|
|
500
|
+
* the bar's height, `--fdy-bottomnav-h`, which the bar is sized by. */
|
|
431
501
|
.fdy-bottomnav{display:none;}
|
|
502
|
+
/* The bar's height, stated once so anything resting on the bar (the action bar) reads the same
|
|
503
|
+
* number the bar is drawn with: a 44px item, the vertical padding, the top hairline. Before this
|
|
504
|
+
* the height was only implied, and an item's icon and label made it 0.39px taller than the sum,
|
|
505
|
+
* more with a taller app font. The safe-area inset is added where it is used, not here. The
|
|
506
|
+
* price of a stated height: with a taller app font the label may overflow into the nav's bottom
|
|
507
|
+
* padding instead of growing it. */
|
|
508
|
+
.fdy-app--has-bottomnav{--fdy-bottomnav-h:calc(2.75rem + 2 * var(--space-2) + var(--bw));}
|
|
432
509
|
@media (max-width:720px){
|
|
433
510
|
.fdy-bottomnav{
|
|
434
511
|
display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;
|
|
@@ -442,6 +519,8 @@ a { color: var(--color-primary-strong); }
|
|
|
442
519
|
backdrop-filter:var(--surface-filter);
|
|
443
520
|
-webkit-backdrop-filter:var(--surface-filter);
|
|
444
521
|
border-top:var(--bw) solid var(--color-border);
|
|
522
|
+
box-sizing:border-box;
|
|
523
|
+
height:calc(var(--fdy-bottomnav-h,auto) + env(safe-area-inset-bottom,0px));
|
|
445
524
|
}
|
|
446
525
|
/* Room for the bar, or the last row of every list on every screen sits under it -- and
|
|
447
526
|
a row you cannot scroll to is a row nobody knows is there. */
|