basefn 1.9.1 → 1.11.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/package.json +4 -4
- package/rescript.json +1 -1
- package/src/Basefn.res +5 -0
- package/src/Basefn.res.mjs +4 -0
- package/src/Basefn__Responsive.res.mjs +5 -5
- package/src/Basefn__Utils.res.mjs +2 -2
- package/src/Demo.res +59 -59
- package/src/Demo.res.mjs +630 -628
- package/src/Example.res +3 -3
- package/src/Example.res.mjs +48 -47
- package/src/components/Basefn__Accordion.res +5 -5
- package/src/components/Basefn__Accordion.res.mjs +25 -26
- package/src/components/Basefn__Alert.res +4 -4
- package/src/components/Basefn__Alert.res.mjs +20 -18
- package/src/components/Basefn__AlertDialog.res +5 -5
- package/src/components/Basefn__AlertDialog.res.mjs +23 -21
- package/src/components/Basefn__AppLayout.res +3 -3
- package/src/components/Basefn__AppLayout.res.mjs +25 -24
- package/src/components/Basefn__AspectRatio.res +1 -1
- package/src/components/Basefn__AspectRatio.res.mjs +2 -2
- package/src/components/Basefn__Avatar.res.mjs +3 -3
- package/src/components/Basefn__Badge.res +1 -1
- package/src/components/Basefn__Badge.res.mjs +2 -2
- package/src/components/Basefn__Breadcrumb.res +5 -5
- package/src/components/Basefn__Breadcrumb.res.mjs +14 -14
- package/src/components/Basefn__Button.res +1 -1
- package/src/components/Basefn__Button.res.mjs +10 -9
- package/src/components/Basefn__ButtonGroup.res +1 -1
- package/src/components/Basefn__ButtonGroup.res.mjs +2 -2
- package/src/components/Basefn__Card.res +3 -3
- package/src/components/Basefn__Card.res.mjs +11 -11
- package/src/components/Basefn__Checkbox.res +1 -1
- package/src/components/Basefn__Checkbox.res.mjs +7 -7
- package/src/components/Basefn__ContextMenu.res +4 -4
- package/src/components/Basefn__ContextMenu.res.mjs +22 -20
- package/src/components/Basefn__Drawer.res +5 -5
- package/src/components/Basefn__Drawer.res.mjs +22 -20
- package/src/components/Basefn__Dropdown.res +4 -4
- package/src/components/Basefn__Dropdown.res.mjs +20 -18
- package/src/components/Basefn__Grid.res.mjs +15 -14
- package/src/components/Basefn__HoverCard.res +3 -3
- package/src/components/Basefn__HoverCard.res.mjs +14 -12
- package/src/components/Basefn__Icon.res.mjs +8 -7
- package/src/components/Basefn__Input.res.mjs +4 -4
- package/src/components/Basefn__Kbd.res +2 -2
- package/src/components/Basefn__Kbd.res.mjs +5 -5
- package/src/components/Basefn__Label.res +1 -1
- package/src/components/Basefn__Label.res.mjs +4 -4
- package/src/components/Basefn__Modal.res +5 -5
- package/src/components/Basefn__Modal.res.mjs +20 -18
- package/src/components/Basefn__Popover.res +3 -3
- package/src/components/Basefn__Popover.res.mjs +15 -13
- package/src/components/Basefn__Progress.res +2 -2
- package/src/components/Basefn__Progress.res.mjs +16 -14
- package/src/components/Basefn__Radio.res +1 -1
- package/src/components/Basefn__Radio.res.mjs +7 -7
- package/src/components/Basefn__Resizable.css +156 -0
- package/src/components/Basefn__Resizable.res +318 -0
- package/src/components/Basefn__Resizable.res.mjs +343 -0
- package/src/components/Basefn__ScrollArea.res +1 -1
- package/src/components/Basefn__ScrollArea.res.mjs +2 -2
- package/src/components/Basefn__Select.res +2 -2
- package/src/components/Basefn__Select.res.mjs +7 -6
- package/src/components/Basefn__Separator.res +1 -1
- package/src/components/Basefn__Separator.res.mjs +9 -9
- package/src/components/Basefn__Sidebar.res +7 -7
- package/src/components/Basefn__Sidebar.res.mjs +28 -24
- package/src/components/Basefn__Skeleton.res.mjs +2 -2
- package/src/components/Basefn__Slider.res +4 -4
- package/src/components/Basefn__Slider.res.mjs +21 -20
- package/src/components/Basefn__Spinner.res +1 -1
- package/src/components/Basefn__Spinner.res.mjs +8 -8
- package/src/components/Basefn__Spotlight.res +22 -14
- package/src/components/Basefn__Spotlight.res.mjs +79 -65
- package/src/components/Basefn__Stepper.res +6 -6
- package/src/components/Basefn__Stepper.res.mjs +20 -24
- package/src/components/Basefn__Switch.res +1 -1
- package/src/components/Basefn__Switch.res.mjs +16 -14
- package/src/components/Basefn__Tabs.res +4 -4
- package/src/components/Basefn__Tabs.res.mjs +19 -17
- package/src/components/Basefn__Textarea.res.mjs +4 -4
- package/src/components/Basefn__ThemeToggle.res +1 -1
- package/src/components/Basefn__ThemeToggle.res.mjs +13 -10
- package/src/components/Basefn__Timeline.res +6 -6
- package/src/components/Basefn__Timeline.res.mjs +21 -21
- package/src/components/Basefn__Toast.res +4 -4
- package/src/components/Basefn__Toast.res.mjs +23 -20
- package/src/components/Basefn__Toggle.res +1 -1
- package/src/components/Basefn__Toggle.res.mjs +8 -7
- package/src/components/Basefn__ToggleGroup.res +2 -2
- package/src/components/Basefn__ToggleGroup.res.mjs +12 -10
- package/src/components/Basefn__Tooltip.res +3 -3
- package/src/components/Basefn__Tooltip.res.mjs +14 -12
- package/src/components/Basefn__Topbar.res +7 -7
- package/src/components/Basefn__Topbar.res.mjs +22 -22
- package/src/components/Basefn__Typography.res +2 -2
- package/src/components/Basefn__Typography.res.mjs +13 -13
- package/src/styles/Basefn__Theme.res.mjs +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "basefn",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/brnrdog/basefn.git"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"lucide": "^0.562.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"xote": "^
|
|
41
|
+
"xote": "^6.0.0"
|
|
42
42
|
},
|
|
43
43
|
"release": {
|
|
44
44
|
"branches": [
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@semantic-release/github": "^12.0.2",
|
|
81
81
|
"@semantic-release/npm": "^13.1.3",
|
|
82
82
|
"rescript": "^12.0.1",
|
|
83
|
-
"vite": "^
|
|
84
|
-
"xote": "^
|
|
83
|
+
"vite": "^8.0.0",
|
|
84
|
+
"xote": "^6.0.0"
|
|
85
85
|
}
|
|
86
86
|
}
|
package/rescript.json
CHANGED
package/src/Basefn.res
CHANGED
|
@@ -72,6 +72,8 @@ type gridJustifyContent = Basefn__Grid.justifyContent
|
|
|
72
72
|
type gridAlignContent = Basefn__Grid.alignContent
|
|
73
73
|
type gridItemColumnSpan = Basefn__Grid.Item.columnSpan
|
|
74
74
|
type gridItemRowSpan = Basefn__Grid.Item.rowSpan
|
|
75
|
+
type resizableDirection = Basefn__Resizable.direction
|
|
76
|
+
type resizablePanel = Basefn__Resizable.panel
|
|
75
77
|
type breakpoint = Basefn__Responsive.breakpoint
|
|
76
78
|
type currentBreakpoint = Basefn__Responsive.currentBreakpoint
|
|
77
79
|
type responsiveValue<'a> = Basefn__Responsive.responsiveValue<'a>
|
|
@@ -231,6 +233,9 @@ module ContextMenu = {
|
|
|
231
233
|
module Spotlight = {
|
|
232
234
|
include Basefn__Spotlight
|
|
233
235
|
}
|
|
236
|
+
module Resizable = {
|
|
237
|
+
include Basefn__Resizable
|
|
238
|
+
}
|
|
234
239
|
|
|
235
240
|
// Responsive Utilities
|
|
236
241
|
module Responsive = {
|
package/src/Basefn.res.mjs
CHANGED
|
@@ -35,6 +35,7 @@ import * as Basefn__Timeline from "./components/Basefn__Timeline.res.mjs";
|
|
|
35
35
|
import * as Basefn__Accordion from "./components/Basefn__Accordion.res.mjs";
|
|
36
36
|
import * as Basefn__AppLayout from "./components/Basefn__AppLayout.res.mjs";
|
|
37
37
|
import * as Basefn__HoverCard from "./components/Basefn__HoverCard.res.mjs";
|
|
38
|
+
import * as Basefn__Resizable from "./components/Basefn__Resizable.res.mjs";
|
|
38
39
|
import * as Basefn__Separator from "./components/Basefn__Separator.res.mjs";
|
|
39
40
|
import * as Basefn__Spotlight from "./components/Basefn__Spotlight.res.mjs";
|
|
40
41
|
import * as Basefn__Breadcrumb from "./components/Basefn__Breadcrumb.res.mjs";
|
|
@@ -143,6 +144,8 @@ let ContextMenu = Basefn__ContextMenu;
|
|
|
143
144
|
|
|
144
145
|
let Spotlight = Basefn__Spotlight;
|
|
145
146
|
|
|
147
|
+
let Resizable = Basefn__Resizable;
|
|
148
|
+
|
|
146
149
|
let Responsive = Basefn__Responsive;
|
|
147
150
|
|
|
148
151
|
export {
|
|
@@ -192,6 +195,7 @@ export {
|
|
|
192
195
|
AlertDialog,
|
|
193
196
|
ContextMenu,
|
|
194
197
|
Spotlight,
|
|
198
|
+
Resizable,
|
|
195
199
|
Responsive,
|
|
196
200
|
}
|
|
197
201
|
/* Not a pure module */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as Xote from "xote/src/
|
|
3
|
+
import * as Signal$Xote from "xote/src/Signal.res.mjs";
|
|
4
4
|
import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
|
|
5
5
|
|
|
6
6
|
import './components/Basefn__Responsive.css'
|
|
@@ -154,8 +154,8 @@ function matchesBreakpointDown(bp) {
|
|
|
154
154
|
|
|
155
155
|
function makeMediaSignal(query) {
|
|
156
156
|
let mql = window.matchMedia(query);
|
|
157
|
-
let signal = Xote.
|
|
158
|
-
let handler = evt => Xote.
|
|
157
|
+
let signal = Signal$Xote.make(mql.matches, undefined, undefined);
|
|
158
|
+
let handler = evt => Signal$Xote.set(signal, evt.matches);
|
|
159
159
|
addChangeListener(mql, handler);
|
|
160
160
|
return signal;
|
|
161
161
|
}
|
|
@@ -251,7 +251,7 @@ function getCurrentBreakpoint() {
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
function makeCurrentBreakpointSignal() {
|
|
254
|
-
let signal = Xote.
|
|
254
|
+
let signal = Signal$Xote.make(getCurrentBreakpoint(), undefined, undefined);
|
|
255
255
|
let breakpoints = [
|
|
256
256
|
"Sm",
|
|
257
257
|
"Md",
|
|
@@ -261,7 +261,7 @@ function makeCurrentBreakpointSignal() {
|
|
|
261
261
|
];
|
|
262
262
|
breakpoints.forEach(bp => {
|
|
263
263
|
let mql = window.matchMedia(minWidth(bp));
|
|
264
|
-
let _handler = _evt => Xote.
|
|
264
|
+
let _handler = _evt => Signal$Xote.set(signal, getCurrentBreakpoint());
|
|
265
265
|
addChangeListener(mql, _handler);
|
|
266
266
|
});
|
|
267
267
|
return signal;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as Signals from "rescript-signals/src/
|
|
3
|
+
import * as Signal$Signals from "rescript-signals/src/signals/Signal.res.mjs";
|
|
4
4
|
|
|
5
5
|
function getValue(reactive) {
|
|
6
6
|
if (reactive.TAG === "Value") {
|
|
7
7
|
return reactive._0;
|
|
8
8
|
} else {
|
|
9
|
-
return Signals.
|
|
9
|
+
return Signal$Signals.get(reactive._0);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
package/src/Demo.res
CHANGED
|
@@ -118,10 +118,10 @@ module Demo = {
|
|
|
118
118
|
let selectOptionsSignal = Signal.make(selectOptions)
|
|
119
119
|
|
|
120
120
|
<>
|
|
121
|
-
{
|
|
122
|
-
<h1> {
|
|
121
|
+
{Node.signalText(() => Signal.get(selectedOption))}
|
|
122
|
+
<h1> {Node.text("basefn-UI Component Library")} </h1>
|
|
123
123
|
<p style="color: #6b7280; margin-bottom: 2rem;">
|
|
124
|
-
{
|
|
124
|
+
{Node.text(
|
|
125
125
|
"A demonstration of all form components with both static and reactive values.",
|
|
126
126
|
)}
|
|
127
127
|
</p>
|
|
@@ -264,7 +264,7 @@ module Demo = {
|
|
|
264
264
|
</div>
|
|
265
265
|
|
|
266
266
|
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
267
|
-
{
|
|
267
|
+
{Node.SignalFragment(
|
|
268
268
|
Computed.make(() => {
|
|
269
269
|
[
|
|
270
270
|
<Button
|
|
@@ -293,7 +293,7 @@ module Demo = {
|
|
|
293
293
|
<div style="margin-top: 2rem;">
|
|
294
294
|
<Typography text={ReactiveProp.Static("Alerts")} variant={Typography.H4} />
|
|
295
295
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
296
|
-
{
|
|
296
|
+
{Node.text("Display important messages with different severity levels.")}
|
|
297
297
|
</p>
|
|
298
298
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
299
299
|
<Alert
|
|
@@ -327,7 +327,7 @@ module Demo = {
|
|
|
327
327
|
<div style="margin-top: 2rem;">
|
|
328
328
|
<Typography text={ReactiveProp.Static("Progress")} variant={Typography.H4} />
|
|
329
329
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
330
|
-
{
|
|
330
|
+
{Node.text("Show progress indicators for ongoing operations.")}
|
|
331
331
|
</p>
|
|
332
332
|
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
333
333
|
<div>
|
|
@@ -387,7 +387,7 @@ module Demo = {
|
|
|
387
387
|
</div>
|
|
388
388
|
<div>
|
|
389
389
|
<p style="color: #6b7280; margin-bottom: 0.5rem;">
|
|
390
|
-
{
|
|
390
|
+
{Node.text("Indeterminate progress:")}
|
|
391
391
|
</p>
|
|
392
392
|
<Progress value={Signal.make(0.0)} variant={Progress.Primary} indeterminate={true} />
|
|
393
393
|
</div>
|
|
@@ -397,7 +397,7 @@ module Demo = {
|
|
|
397
397
|
<div style="margin-top: 2rem;">
|
|
398
398
|
<Typography text={ReactiveProp.Static("Tabs")} variant={Typography.H4} />
|
|
399
399
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
400
|
-
{
|
|
400
|
+
{Node.text("Organize content into tabbed sections.")}
|
|
401
401
|
</p>
|
|
402
402
|
<Tabs
|
|
403
403
|
tabs={[
|
|
@@ -409,7 +409,7 @@ module Demo = {
|
|
|
409
409
|
text={ReactiveProp.Static("Account Settings")} variant={Typography.H5}
|
|
410
410
|
/>
|
|
411
411
|
<p style="color: #6b7280; margin-top: 0.5rem;">
|
|
412
|
-
{
|
|
412
|
+
{Node.text(
|
|
413
413
|
"Manage your account settings and preferences here. You can update your profile information, change your password, and configure notification settings.",
|
|
414
414
|
)}
|
|
415
415
|
</p>
|
|
@@ -423,7 +423,7 @@ module Demo = {
|
|
|
423
423
|
text={ReactiveProp.Static("Security Settings")} variant={Typography.H5}
|
|
424
424
|
/>
|
|
425
425
|
<p style="color: #6b7280; margin-top: 0.5rem;">
|
|
426
|
-
{
|
|
426
|
+
{Node.text(
|
|
427
427
|
"Configure your security preferences including two-factor authentication, active sessions, and security logs.",
|
|
428
428
|
)}
|
|
429
429
|
</p>
|
|
@@ -444,7 +444,7 @@ module Demo = {
|
|
|
444
444
|
text={ReactiveProp.Static("Notification Preferences")} variant={Typography.H5}
|
|
445
445
|
/>
|
|
446
446
|
<p style="color: #6b7280; margin-top: 0.5rem;">
|
|
447
|
-
{
|
|
447
|
+
{Node.text("Choose how you want to receive notifications.")}
|
|
448
448
|
</p>
|
|
449
449
|
<div style="display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem;">
|
|
450
450
|
<Checkbox
|
|
@@ -467,7 +467,7 @@ module Demo = {
|
|
|
467
467
|
text={ReactiveProp.Static("Billing Information")} variant={Typography.H5}
|
|
468
468
|
/>
|
|
469
469
|
<p style="color: #6b7280; margin-top: 0.5rem;">
|
|
470
|
-
{
|
|
470
|
+
{Node.text(
|
|
471
471
|
"View and manage your billing information, payment methods, and invoices.",
|
|
472
472
|
)}
|
|
473
473
|
</p>
|
|
@@ -481,7 +481,7 @@ module Demo = {
|
|
|
481
481
|
<div style="margin-top: 2rem;">
|
|
482
482
|
<Typography text={ReactiveProp.Static("Accordion")} variant={Typography.H4} />
|
|
483
483
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
484
|
-
{
|
|
484
|
+
{Node.text("Collapsible content sections with expand/collapse functionality.")}
|
|
485
485
|
</p>
|
|
486
486
|
<Accordion
|
|
487
487
|
items={[
|
|
@@ -489,7 +489,7 @@ module Demo = {
|
|
|
489
489
|
value: "faq1",
|
|
490
490
|
title: "What is basefn-UI?",
|
|
491
491
|
content: <p>
|
|
492
|
-
{
|
|
492
|
+
{Node.text(
|
|
493
493
|
"basefn-UI is a modern, reactive UI component library built with ReScript and Xote. It provides a comprehensive set of accessible and customizable components for building web applications.",
|
|
494
494
|
)}
|
|
495
495
|
</p>,
|
|
@@ -499,7 +499,7 @@ module Demo = {
|
|
|
499
499
|
title: "How do I install basefn-UI?",
|
|
500
500
|
content: <div>
|
|
501
501
|
<p>
|
|
502
|
-
{
|
|
502
|
+
{Node.text(
|
|
503
503
|
"You can install basefn-UI via npm or yarn. Here's how to get started:",
|
|
504
504
|
)}
|
|
505
505
|
</p>
|
|
@@ -513,7 +513,7 @@ module Demo = {
|
|
|
513
513
|
value: "faq3",
|
|
514
514
|
title: "Is basefn-UI customizable?",
|
|
515
515
|
content: <p>
|
|
516
|
-
{
|
|
516
|
+
{Node.text(
|
|
517
517
|
"Yes! basefn-UI is fully customizable. You can override the default styles using CSS variables or by providing custom CSS classes. Each component accepts standard HTML attributes including className and style.",
|
|
518
518
|
)}
|
|
519
519
|
</p>,
|
|
@@ -522,7 +522,7 @@ module Demo = {
|
|
|
522
522
|
value: "faq4",
|
|
523
523
|
title: "Does basefn-UI support TypeScript?",
|
|
524
524
|
content: <p>
|
|
525
|
-
{
|
|
525
|
+
{Node.text(
|
|
526
526
|
"basefn-UI is built with ReScript, which provides excellent type safety. While it doesn't directly use TypeScript, ReScript's type system is even more robust and catches errors at compile time.",
|
|
527
527
|
)}
|
|
528
528
|
</p>,
|
|
@@ -536,12 +536,12 @@ module Demo = {
|
|
|
536
536
|
<div style="margin-top: 2rem;">
|
|
537
537
|
<Typography text={ReactiveProp.Static("Breadcrumb")} variant={Typography.H4} />
|
|
538
538
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
539
|
-
{
|
|
539
|
+
{Node.text("Navigation breadcrumbs to show the current page hierarchy.")}
|
|
540
540
|
</p>
|
|
541
541
|
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
542
542
|
<div>
|
|
543
543
|
<p style="color: #6b7280; margin-bottom: 0.5rem; font-size: 0.875rem;">
|
|
544
|
-
{
|
|
544
|
+
{Node.text("Default separator:")}
|
|
545
545
|
</p>
|
|
546
546
|
<Breadcrumb
|
|
547
547
|
items={[
|
|
@@ -554,7 +554,7 @@ module Demo = {
|
|
|
554
554
|
</div>
|
|
555
555
|
<div>
|
|
556
556
|
<p style="color: #6b7280; margin-bottom: 0.5rem; font-size: 0.875rem;">
|
|
557
|
-
{
|
|
557
|
+
{Node.text("Custom separator:")}
|
|
558
558
|
</p>
|
|
559
559
|
<Breadcrumb
|
|
560
560
|
items={[
|
|
@@ -567,7 +567,7 @@ module Demo = {
|
|
|
567
567
|
</div>
|
|
568
568
|
<div>
|
|
569
569
|
<p style="color: #6b7280; margin-bottom: 0.5rem; font-size: 0.875rem;">
|
|
570
|
-
{
|
|
570
|
+
{Node.text("With onClick handlers:")}
|
|
571
571
|
</p>
|
|
572
572
|
<Breadcrumb
|
|
573
573
|
items={[
|
|
@@ -607,7 +607,7 @@ module Demo = {
|
|
|
607
607
|
<div style="margin-top: 2rem;">
|
|
608
608
|
<Typography text={ReactiveProp.Static("Modal / Dialog")} variant={Typography.H4} />
|
|
609
609
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
610
|
-
{
|
|
610
|
+
{Node.text("Display content in an overlay dialog.")}
|
|
611
611
|
</p>
|
|
612
612
|
<Button
|
|
613
613
|
label={Static("Open Modal")}
|
|
@@ -636,12 +636,12 @@ module Demo = {
|
|
|
636
636
|
</div>}
|
|
637
637
|
>
|
|
638
638
|
<p>
|
|
639
|
-
{
|
|
639
|
+
{Node.text(
|
|
640
640
|
"This is a modal dialog. You can include any content here. Click the backdrop or the close button to dismiss.",
|
|
641
641
|
)}
|
|
642
642
|
</p>
|
|
643
643
|
<p style="margin-top: 1rem;">
|
|
644
|
-
{
|
|
644
|
+
{Node.text("Modals are great for focused user interactions and confirmations.")}
|
|
645
645
|
</p>
|
|
646
646
|
</Modal>
|
|
647
647
|
</div>
|
|
@@ -650,7 +650,7 @@ module Demo = {
|
|
|
650
650
|
<div style="margin-top: 2rem;">
|
|
651
651
|
<Typography text={ReactiveProp.Static("Switch / Toggle")} variant={Typography.H4} />
|
|
652
652
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
653
|
-
{
|
|
653
|
+
{Node.text("Binary on/off switches for settings and preferences.")}
|
|
654
654
|
</p>
|
|
655
655
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
656
656
|
<Switch checked={switchEnabled} label="Enable feature" />
|
|
@@ -666,7 +666,7 @@ module Demo = {
|
|
|
666
666
|
<div style="margin-top: 2rem;">
|
|
667
667
|
<Typography text={ReactiveProp.Static("Slider")} variant={Typography.H4} />
|
|
668
668
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
669
|
-
{
|
|
669
|
+
{Node.text("Select a value from a range.")}
|
|
670
670
|
</p>
|
|
671
671
|
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
672
672
|
<Slider value={sliderValue} label="Volume" showValue={true} />
|
|
@@ -694,7 +694,7 @@ module Demo = {
|
|
|
694
694
|
<div style="margin-top: 2rem;">
|
|
695
695
|
<Typography text={ReactiveProp.Static("Tooltip")} variant={Typography.H4} />
|
|
696
696
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
697
|
-
{
|
|
697
|
+
{Node.text("Show contextual information on hover.")}
|
|
698
698
|
</p>
|
|
699
699
|
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
700
700
|
<Tooltip content="This appears on top" position={Tooltip.Top}>
|
|
@@ -716,7 +716,7 @@ module Demo = {
|
|
|
716
716
|
<div style="margin-top: 2rem;">
|
|
717
717
|
<Typography text={ReactiveProp.Static("Dropdown Menu")} variant={Typography.H4} />
|
|
718
718
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
719
|
-
{
|
|
719
|
+
{Node.text("Contextual menu with actions.")}
|
|
720
720
|
</p>
|
|
721
721
|
<div style="display: flex; gap: 1rem;">
|
|
722
722
|
<Dropdown
|
|
@@ -769,7 +769,7 @@ module Demo = {
|
|
|
769
769
|
<div style="margin-top: 2rem;">
|
|
770
770
|
<Typography text={ReactiveProp.Static("Toast / Notification")} variant={Typography.H4} />
|
|
771
771
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
772
|
-
{
|
|
772
|
+
{Node.text("Temporary notification messages.")}
|
|
773
773
|
</p>
|
|
774
774
|
<div style="display: flex; gap: 0.75rem; flex-wrap: wrap;">
|
|
775
775
|
<Button
|
|
@@ -805,12 +805,12 @@ module Demo = {
|
|
|
805
805
|
<div style="margin-top: 2rem;">
|
|
806
806
|
<Typography text={ReactiveProp.Static("Stepper")} variant={Typography.H4} />
|
|
807
807
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
808
|
-
{
|
|
808
|
+
{Node.text("Multi-step process indicator with progress tracking.")}
|
|
809
809
|
</p>
|
|
810
810
|
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
811
811
|
<div>
|
|
812
812
|
<p style="color: #6b7280; margin-bottom: 1rem; font-size: 0.875rem;">
|
|
813
|
-
{
|
|
813
|
+
{Node.text("Horizontal stepper:")}
|
|
814
814
|
</p>
|
|
815
815
|
<Stepper
|
|
816
816
|
steps={[
|
|
@@ -845,7 +845,7 @@ module Demo = {
|
|
|
845
845
|
</div>
|
|
846
846
|
<div>
|
|
847
847
|
<p style="color: #6b7280; margin-bottom: 1rem; font-size: 0.875rem;">
|
|
848
|
-
{
|
|
848
|
+
{Node.text("Vertical stepper:")}
|
|
849
849
|
</p>
|
|
850
850
|
<Stepper
|
|
851
851
|
steps={[
|
|
@@ -881,7 +881,7 @@ module Demo = {
|
|
|
881
881
|
<div style="margin-top: 2rem;">
|
|
882
882
|
<Typography text={ReactiveProp.Static("Drawer / Sidebar")} variant={Typography.H4} />
|
|
883
883
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
884
|
-
{
|
|
884
|
+
{Node.text("Slide-in panels for additional content.")}
|
|
885
885
|
</p>
|
|
886
886
|
<div style="display: flex; gap: 0.75rem; flex-wrap: wrap;">
|
|
887
887
|
<Button
|
|
@@ -915,7 +915,7 @@ module Demo = {
|
|
|
915
915
|
<div>
|
|
916
916
|
<Typography text={ReactiveProp.Static("Drawer Content")} variant={Typography.H5} />
|
|
917
917
|
<p style="margin-top: 1rem;">
|
|
918
|
-
{
|
|
918
|
+
{Node.text(
|
|
919
919
|
"This is a drawer panel. You can use it for navigation, forms, or any additional content that doesn't fit in the main view.",
|
|
920
920
|
)}
|
|
921
921
|
</p>
|
|
@@ -939,12 +939,12 @@ module Demo = {
|
|
|
939
939
|
<div style="margin-top: 2rem;">
|
|
940
940
|
<Typography text={ReactiveProp.Static("Timeline")} variant={Typography.H4} />
|
|
941
941
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
942
|
-
{
|
|
942
|
+
{Node.text("Display chronological events in a visual timeline.")}
|
|
943
943
|
</p>
|
|
944
944
|
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
945
945
|
<div>
|
|
946
946
|
<p style="color: #6b7280; margin-bottom: 1rem; font-size: 0.875rem;">
|
|
947
|
-
{
|
|
947
|
+
{Node.text("Vertical timeline:")}
|
|
948
948
|
</p>
|
|
949
949
|
<Timeline
|
|
950
950
|
items={[
|
|
@@ -982,7 +982,7 @@ module Demo = {
|
|
|
982
982
|
</div>
|
|
983
983
|
<div>
|
|
984
984
|
<p style="color: #6b7280; margin-bottom: 1rem; font-size: 0.875rem;">
|
|
985
|
-
{
|
|
985
|
+
{Node.text("With different variants:")}
|
|
986
986
|
</p>
|
|
987
987
|
<Timeline
|
|
988
988
|
items={[
|
|
@@ -1036,21 +1036,21 @@ module Demo = {
|
|
|
1036
1036
|
<div style="margin-top: 2rem;">
|
|
1037
1037
|
<Typography text={ReactiveProp.Static("Layout Variants")} variant={Typography.H4} />
|
|
1038
1038
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
1039
|
-
{
|
|
1039
|
+
{Node.text("Different application layout configurations.")}
|
|
1040
1040
|
</p>
|
|
1041
1041
|
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
1042
1042
|
// Sidebar Only Example
|
|
1043
1043
|
<div>
|
|
1044
1044
|
<Typography text={ReactiveProp.Static("Sidebar Only Layout")} variant={Typography.H5} />
|
|
1045
1045
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0; font-size: 0.875rem;">
|
|
1046
|
-
{
|
|
1046
|
+
{Node.text("Application with sidebar navigation")}
|
|
1047
1047
|
</p>
|
|
1048
1048
|
<div
|
|
1049
1049
|
style="border: 2px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; height: 400px;"
|
|
1050
1050
|
>
|
|
1051
1051
|
<AppLayout
|
|
1052
1052
|
sidebar={<Sidebar
|
|
1053
|
-
logo={
|
|
1053
|
+
logo={Node.text("eita UI")}
|
|
1054
1054
|
sections={[
|
|
1055
1055
|
{
|
|
1056
1056
|
title: Some("Main"),
|
|
@@ -1095,7 +1095,7 @@ module Demo = {
|
|
|
1095
1095
|
text={ReactiveProp.Static("Main Content Area")} variant={Typography.H3}
|
|
1096
1096
|
/>
|
|
1097
1097
|
<p style="margin-top: 1rem;">
|
|
1098
|
-
{
|
|
1098
|
+
{Node.text(
|
|
1099
1099
|
"This is the main content area. The sidebar provides persistent navigation.",
|
|
1100
1100
|
)}
|
|
1101
1101
|
</p>
|
|
@@ -1108,14 +1108,14 @@ module Demo = {
|
|
|
1108
1108
|
<div>
|
|
1109
1109
|
<Typography text={ReactiveProp.Static("Topbar Only Layout")} variant={Typography.H5} />
|
|
1110
1110
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0; font-size: 0.875rem;">
|
|
1111
|
-
{
|
|
1111
|
+
{Node.text("Application with top navigation bar")}
|
|
1112
1112
|
</p>
|
|
1113
1113
|
<div
|
|
1114
1114
|
style="border: 2px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; height: 300px;"
|
|
1115
1115
|
>
|
|
1116
1116
|
<AppLayout
|
|
1117
1117
|
topbar={<Topbar
|
|
1118
|
-
logo={
|
|
1118
|
+
logo={Node.text("eita UI")}
|
|
1119
1119
|
navItems={[
|
|
1120
1120
|
{
|
|
1121
1121
|
label: "Home",
|
|
@@ -1144,7 +1144,7 @@ module Demo = {
|
|
|
1144
1144
|
text={ReactiveProp.Static("Main Content Area")} variant={Typography.H3}
|
|
1145
1145
|
/>
|
|
1146
1146
|
<p style="margin-top: 1rem;">
|
|
1147
|
-
{
|
|
1147
|
+
{Node.text("This layout uses only a top navigation bar.")}
|
|
1148
1148
|
</p>
|
|
1149
1149
|
</div>
|
|
1150
1150
|
</AppLayout>
|
|
@@ -1157,14 +1157,14 @@ module Demo = {
|
|
|
1157
1157
|
text={ReactiveProp.Static("Sidebar + Topbar Layout")} variant={Typography.H5}
|
|
1158
1158
|
/>
|
|
1159
1159
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0; font-size: 0.875rem;">
|
|
1160
|
-
{
|
|
1160
|
+
{Node.text("Full application layout with both sidebar and topbar")}
|
|
1161
1161
|
</p>
|
|
1162
1162
|
<div
|
|
1163
1163
|
style="border: 2px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; height: 500px;"
|
|
1164
1164
|
>
|
|
1165
1165
|
<AppLayout
|
|
1166
1166
|
sidebar={<Sidebar
|
|
1167
|
-
logo={
|
|
1167
|
+
logo={Node.text("basefn")}
|
|
1168
1168
|
sections={[
|
|
1169
1169
|
{
|
|
1170
1170
|
title: Some("Navigation"),
|
|
@@ -1206,7 +1206,7 @@ module Demo = {
|
|
|
1206
1206
|
<div style="padding: 2rem;">
|
|
1207
1207
|
<Typography text={ReactiveProp.Static("Dashboard")} variant={Typography.H3} />
|
|
1208
1208
|
<p style="margin-top: 1rem;">
|
|
1209
|
-
{
|
|
1209
|
+
{Node.text(
|
|
1210
1210
|
"This is a complete application layout with both sidebar and topbar. Click the menu button in the topbar to toggle the sidebar.",
|
|
1211
1211
|
)}
|
|
1212
1212
|
</p>
|
|
@@ -1263,7 +1263,7 @@ module Demo = {
|
|
|
1263
1263
|
<div style="margin-top: 2rem;">
|
|
1264
1264
|
<Typography text={ReactiveProp.Static("Badges")} variant={Typography.H4} />
|
|
1265
1265
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
1266
|
-
{
|
|
1266
|
+
{Node.text("Display status indicators and labels with various styles.")}
|
|
1267
1267
|
</p>
|
|
1268
1268
|
<div style="display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center;">
|
|
1269
1269
|
<Badge label={Signal.make("Default")} variant={Badge.Default} />
|
|
@@ -1290,7 +1290,7 @@ module Demo = {
|
|
|
1290
1290
|
<div style="margin-top: 2rem;">
|
|
1291
1291
|
<Typography text={ReactiveProp.Static("Spinners")} variant={Typography.H4} />
|
|
1292
1292
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
1293
|
-
{
|
|
1293
|
+
{Node.text("Loading indicators in different sizes and colors.")}
|
|
1294
1294
|
</p>
|
|
1295
1295
|
<div style="display: flex; gap: 2rem; flex-wrap: wrap; align-items: center;">
|
|
1296
1296
|
<Spinner size={Spinner.Sm} variant={Spinner.Default} />
|
|
@@ -1314,24 +1314,24 @@ module Demo = {
|
|
|
1314
1314
|
<div style="margin-top: 2rem;">
|
|
1315
1315
|
<Typography text={ReactiveProp.Static("Keyboard Shortcuts")} variant={Typography.H4} />
|
|
1316
1316
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
1317
|
-
{
|
|
1317
|
+
{Node.text("Display keyboard shortcuts in a visually appealing way.")}
|
|
1318
1318
|
</p>
|
|
1319
1319
|
<div style="display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center;">
|
|
1320
1320
|
<div>
|
|
1321
|
-
<span style="color: #6b7280; margin-right: 0.5rem;"> {
|
|
1321
|
+
<span style="color: #6b7280; margin-right: 0.5rem;"> {Node.text("Copy:")} </span>
|
|
1322
1322
|
<Kbd keys={Signal.make(["Ctrl", "C"])} size={Kbd.Md} />
|
|
1323
1323
|
</div>
|
|
1324
1324
|
<div>
|
|
1325
|
-
<span style="color: #6b7280; margin-right: 0.5rem;"> {
|
|
1325
|
+
<span style="color: #6b7280; margin-right: 0.5rem;"> {Node.text("Paste:")} </span>
|
|
1326
1326
|
<Kbd keys={Signal.make(["Ctrl", "V"])} size={Kbd.Md} />
|
|
1327
1327
|
</div>
|
|
1328
1328
|
<div>
|
|
1329
|
-
<span style="color: #6b7280; margin-right: 0.5rem;"> {
|
|
1329
|
+
<span style="color: #6b7280; margin-right: 0.5rem;"> {Node.text("Save:")} </span>
|
|
1330
1330
|
<Kbd keys={Signal.make(["Ctrl", "S"])} size={Kbd.Md} />
|
|
1331
1331
|
</div>
|
|
1332
1332
|
<div>
|
|
1333
1333
|
<span style="color: #6b7280; margin-right: 0.5rem;">
|
|
1334
|
-
{
|
|
1334
|
+
{Node.text("Select All:")}
|
|
1335
1335
|
</span>
|
|
1336
1336
|
<Kbd keys={Signal.make(["Ctrl", "A"])} size={Kbd.Md} />
|
|
1337
1337
|
</div>
|
|
@@ -1339,7 +1339,7 @@ module Demo = {
|
|
|
1339
1339
|
<div style="margin-top: 1rem;">
|
|
1340
1340
|
<Kbd keys={Signal.make(["Shift", "Alt", "F"])} size={Kbd.Sm} />
|
|
1341
1341
|
<span style="color: #6b7280; margin-left: 0.5rem;">
|
|
1342
|
-
{
|
|
1342
|
+
{Node.text("Format Document")}
|
|
1343
1343
|
</span>
|
|
1344
1344
|
</div>
|
|
1345
1345
|
</div>
|
|
@@ -1350,7 +1350,7 @@ module Demo = {
|
|
|
1350
1350
|
<div style="margin-top: 2rem;">
|
|
1351
1351
|
<Typography text={ReactiveProp.Static("Typography")} variant={Typography.H4} />
|
|
1352
1352
|
<p style="color: #6b7280; margin: 0.5rem 0 1rem 0;">
|
|
1353
|
-
{
|
|
1353
|
+
{Node.text("Consistent text styling across your application.")}
|
|
1354
1354
|
</p>
|
|
1355
1355
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
1356
1356
|
<Typography text={ReactiveProp.Static("Heading 1")} variant={Typography.H1} />
|
|
@@ -1389,11 +1389,11 @@ module Demo = {
|
|
|
1389
1389
|
<div
|
|
1390
1390
|
style="margin-top: 3rem; padding: 1rem; background-color: #f3f4f6; border-radius: 0.5rem;"
|
|
1391
1391
|
>
|
|
1392
|
-
<h3 style="margin-top: 0; color: #374151;"> {
|
|
1392
|
+
<h3 style="margin-top: 0; color: #374151;"> {Node.text("Form State (Real-time)")} </h3>
|
|
1393
1393
|
<pre
|
|
1394
1394
|
style="background-color: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 0.25rem; overflow-x: auto; font-size: 0.875rem;"
|
|
1395
1395
|
>
|
|
1396
|
-
{
|
|
1396
|
+
{Node.signalText(() => {
|
|
1397
1397
|
`Name: ${Signal.get(name)}
|
|
1398
1398
|
Email: ${Signal.get(email)}
|
|
1399
1399
|
Password: ${"*"->String.repeat(Signal.get(password)->String.length)}
|
|
@@ -1414,4 +1414,4 @@ Newsletter: ${Signal.get(newsletter)->Bool.toString}`
|
|
|
1414
1414
|
}
|
|
1415
1415
|
|
|
1416
1416
|
// Mount the demo application
|
|
1417
|
-
|
|
1417
|
+
Node.mountById(<Demo />, "root")
|