basefn 1.1.0 → 1.1.2
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 +61 -65
- package/package.json +3 -2
- package/rescript.json +0 -5
- package/src/Basefn.res +105 -35
- package/src/Basefn.res.mjs +70 -35
- package/src/Demo.res.mjs +199 -230
- package/src/Example.res.mjs +12 -17
- package/src/components/Basefn__Accordion.res +3 -1
- package/src/components/Basefn__Accordion.res.mjs +9 -0
- /package/src/{Basefn.css → basefn.css} +0 -0
package/src/Example.res.mjs
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Xote from "xote/src/Xote.res.mjs";
|
|
4
|
+
import * as Basefn from "./Basefn.res.mjs";
|
|
4
5
|
import * as Xote__JSX from "xote/src/Xote__JSX.res.mjs";
|
|
5
|
-
import * as Basefn__Input from "./components/Basefn__Input.res.mjs";
|
|
6
|
-
import * as Basefn__Label from "./components/Basefn__Label.res.mjs";
|
|
7
|
-
import * as Basefn__Button from "./components/Basefn__Button.res.mjs";
|
|
8
|
-
import * as Basefn__Select from "./components/Basefn__Select.res.mjs";
|
|
9
|
-
import * as Basefn__Checkbox from "./components/Basefn__Checkbox.res.mjs";
|
|
10
|
-
import * as Basefn__Textarea from "./components/Basefn__Textarea.res.mjs";
|
|
11
6
|
|
|
12
7
|
function Example$ExampleForm(props) {
|
|
13
8
|
let name = Xote.Signal.make("", undefined, undefined);
|
|
@@ -62,11 +57,11 @@ function Example$ExampleForm(props) {
|
|
|
62
57
|
Xote__JSX.Elements.jsxs("div", {
|
|
63
58
|
style: "margin-bottom: 1rem;",
|
|
64
59
|
children: Xote__JSX.array([
|
|
65
|
-
Xote__JSX.jsx(
|
|
60
|
+
Xote__JSX.jsx(Basefn.Label.make, {
|
|
66
61
|
text: "Name",
|
|
67
62
|
required: true
|
|
68
63
|
}),
|
|
69
|
-
Xote__JSX.jsx(
|
|
64
|
+
Xote__JSX.jsx(Basefn.Input.make, {
|
|
70
65
|
value: {
|
|
71
66
|
TAG: "Reactive",
|
|
72
67
|
_0: name
|
|
@@ -80,11 +75,11 @@ function Example$ExampleForm(props) {
|
|
|
80
75
|
Xote__JSX.Elements.jsxs("div", {
|
|
81
76
|
style: "margin-bottom: 1rem;",
|
|
82
77
|
children: Xote__JSX.array([
|
|
83
|
-
Xote__JSX.jsx(
|
|
78
|
+
Xote__JSX.jsx(Basefn.Label.make, {
|
|
84
79
|
text: "Email",
|
|
85
80
|
required: true
|
|
86
81
|
}),
|
|
87
|
-
Xote__JSX.jsx(
|
|
82
|
+
Xote__JSX.jsx(Basefn.Input.make, {
|
|
88
83
|
value: {
|
|
89
84
|
TAG: "Reactive",
|
|
90
85
|
_0: email
|
|
@@ -98,11 +93,11 @@ function Example$ExampleForm(props) {
|
|
|
98
93
|
Xote__JSX.Elements.jsxs("div", {
|
|
99
94
|
style: "margin-bottom: 1rem;",
|
|
100
95
|
children: Xote__JSX.array([
|
|
101
|
-
Xote__JSX.jsx(
|
|
96
|
+
Xote__JSX.jsx(Basefn.Label.make, {
|
|
102
97
|
text: "Choose an option",
|
|
103
98
|
required: false
|
|
104
99
|
}),
|
|
105
|
-
Xote__JSX.jsx(
|
|
100
|
+
Xote__JSX.jsx(Basefn.Select.make, {
|
|
106
101
|
value: selectedOption,
|
|
107
102
|
options: selectOptions
|
|
108
103
|
})
|
|
@@ -111,11 +106,11 @@ function Example$ExampleForm(props) {
|
|
|
111
106
|
Xote__JSX.Elements.jsxs("div", {
|
|
112
107
|
style: "margin-bottom: 1rem;",
|
|
113
108
|
children: Xote__JSX.array([
|
|
114
|
-
Xote__JSX.jsx(
|
|
109
|
+
Xote__JSX.jsx(Basefn.Label.make, {
|
|
115
110
|
text: "Message",
|
|
116
111
|
required: false
|
|
117
112
|
}),
|
|
118
|
-
Xote__JSX.jsx(
|
|
113
|
+
Xote__JSX.jsx(Basefn.Textarea.make, {
|
|
119
114
|
value: {
|
|
120
115
|
TAG: "Reactive",
|
|
121
116
|
_0: message
|
|
@@ -127,7 +122,7 @@ function Example$ExampleForm(props) {
|
|
|
127
122
|
}),
|
|
128
123
|
Xote__JSX.Elements.jsx("div", {
|
|
129
124
|
style: "margin-bottom: 1rem;",
|
|
130
|
-
children: Xote__JSX.jsx(
|
|
125
|
+
children: Xote__JSX.jsx(Basefn.Checkbox.make, {
|
|
131
126
|
checked: agreeToTerms,
|
|
132
127
|
onChange: handleCheckboxChange,
|
|
133
128
|
label: "I agree to the terms and conditions"
|
|
@@ -136,7 +131,7 @@ function Example$ExampleForm(props) {
|
|
|
136
131
|
Xote__JSX.Elements.jsxs("div", {
|
|
137
132
|
style: "display: flex; gap: 1rem;",
|
|
138
133
|
children: Xote__JSX.array([
|
|
139
|
-
Xote__JSX.jsx(
|
|
134
|
+
Xote__JSX.jsx(Basefn.Button.make, {
|
|
140
135
|
children: Xote.Component.textSignal(() => {
|
|
141
136
|
if (Xote.Signal.get(isSubmitting)) {
|
|
142
137
|
return "Submitting...";
|
|
@@ -151,7 +146,7 @@ function Example$ExampleForm(props) {
|
|
|
151
146
|
onClick: handleSubmit,
|
|
152
147
|
variant: "Primary"
|
|
153
148
|
}),
|
|
154
|
-
Xote__JSX.jsx(
|
|
149
|
+
Xote__JSX.jsx(Basefn.Button.make, {
|
|
155
150
|
label: {
|
|
156
151
|
TAG: "Static",
|
|
157
152
|
_0: "Cancel"
|
|
@@ -69,9 +69,18 @@ function Basefn__Accordion(props) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
let Signal;
|
|
73
|
+
|
|
74
|
+
let Computed;
|
|
75
|
+
|
|
76
|
+
let Component;
|
|
77
|
+
|
|
72
78
|
let make = Basefn__Accordion;
|
|
73
79
|
|
|
74
80
|
export {
|
|
81
|
+
Signal,
|
|
82
|
+
Computed,
|
|
83
|
+
Component,
|
|
75
84
|
make,
|
|
76
85
|
}
|
|
77
86
|
/* Not a pure module */
|
|
File without changes
|