Skip to content

Commit

Permalink
Mint UI and Mint UI Website works!
Browse files Browse the repository at this point in the history
  • Loading branch information
gdotdesign committed Jan 19, 2024
1 parent d13b3ce commit c01605b
Show file tree
Hide file tree
Showing 32 changed files with 259 additions and 194 deletions.
6 changes: 2 additions & 4 deletions spec/compilers2/argument
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ component Main {
}
}
--------------------------------------------------------------------------------
import { define as B } from "runtime";

const A = () => {
const a = B('a', (b, c) => {
const a = (b, c) => {
return c
});
};
a(``, 0);
return ``
};
6 changes: 2 additions & 4 deletions spec/compilers2/argument_with_default
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ component Main {
}
}
--------------------------------------------------------------------------------
import { define as B } from "runtime";

const A = () => {
const a = B('a', (b, c = 0) => {
const a = (b, c = 0) => {
return c
});
};
a(``);
return ``
};
10 changes: 4 additions & 6 deletions spec/compilers2/block_with_await
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ component Main {
}
}
--------------------------------------------------------------------------------
import { define as B } from "runtime";

const A = () => {
const
a = B('a', () => {
a = () => {
return undefined
}),
b = B('b', async () => {
},
b = async () => {
return await a()
});
};
b();
return `Hello`
};
6 changes: 2 additions & 4 deletions spec/compilers2/call_labelled
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ component Main {
}
}
--------------------------------------------------------------------------------
import { define as B } from "runtime";

const A = () => {
const a = B('a', (b, c) => {
const a = (b, c) => {
return ``
});
};
return a(``, 0)
};
7 changes: 3 additions & 4 deletions spec/compilers2/component_global
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ component Main {
--------------------------------------------------------------------------------
import {
createElement as B,
computed as E,
signal as D
} from "runtime";

const
A = () => {
return B(`div`, {}, [a.value])
return B(`div`, {}, [a()])
},
b = (c) => {
return c
Expand All @@ -41,6 +40,6 @@ const
return B(`div`, {}, [b(`Hello`)])
},
d = D(``),
a = E(() => {
a = () => {
return d.value
});
};
48 changes: 23 additions & 25 deletions spec/compilers2/component_instance_access
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ component Main {
}
--------------------------------------------------------------------------------
import {
patternVariable as M,
createElement as G,
useComputed as E,
pattern as L,
useMemo as F,
patternVariable as K,
createElement as F,
pattern as J,
useMemo as E,
variant as B,
setRef as N,
define as J,
useRef as I,
match as K
setRef as L,
useRef as H,
match as I
} from "runtime";

const
Expand All @@ -47,39 +45,39 @@ const
D = ({
_
}) => {
const a = E(() => {
const a = () => {
return `Instance`
});
const b = F(() => {
};
const b = E(() => {
return {
a
}
}, []);
_(b);
return G(`div`, {})
(_ ? _(b) : null);
return F(`div`, {})
},
H = () => {
G = () => {
const
c = I(new C()),
d = J('d', () => {
return K(c.current, [
c = H(new C()),
d = () => {
return I(c.current, [
[
L(A, [M]),
J(A, [K]),
(e) => {
return e.a
return e.a()
}
],
[
L(C, []),
J(C, []),
() => {
return ``
}
]
])
});
return G(`div`, {
};
return F(`div`, {
"onClick": d
}, [G(D, {
_: N(c, A)
}, [F(D, {
_: L(c, A)
})])
};
79 changes: 79 additions & 0 deletions spec/compilers2/component_instance_access_ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
enum Maybe(value) {
Just(value)
Nothing
}

component Instance {
fun render : Html {
<div as base></div>
}
}

component Main {
fun handleClick {
case (instance) {
Maybe::Just(component) => component.base
Maybe::Nothing => Maybe::Nothing
}
}

fun render : Html {
<div onClick={handleClick}>
<Instance as instance/>
</div>
}
}
--------------------------------------------------------------------------------
import {
patternVariable as L,
createElement as G,
pattern as K,
useMemo as F,
variant as B,
setRef as H,
useRef as E,
match as J
} from "runtime";

const
A = B(1),
C = B(0),
D = ({
_
}) => {
const a = E(new C());
const b = F(() => {
return {
a
}
}, []);
(_ ? _(b) : null);
return G(`div`, {
ref: H(a, A)
})
},
I = () => {
const
c = E(new C()),
d = () => {
return J(c.current, [
[
K(A, [L]),
(e) => {
return e.a.current
}
],
[
K(C, []),
() => {
return new C()
}
]
])
};
return G(`div`, {
"onClick": d
}, [G(D, {
_: H(c, A)
})])
};
15 changes: 7 additions & 8 deletions spec/compilers2/css_definition
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,24 @@ component Main {
}
--------------------------------------------------------------------------------
import {
createElement as C,
useComputed as B,
style as D
createElement as B,
style as C
} from "runtime";

const A = () => {
const
a = B(() => {
a = () => {
return 10
}),
},
b = () => {
const _ = {
[`--a-a`]: a.value + `px 0px`
[`--a-a`]: a() + `px 0px`
};
return _
};
return C(`div`, {
return B(`div`, {
className: `Main_test`,
style: D([b()])
style: C([b()])
})
};

Expand Down
17 changes: 8 additions & 9 deletions spec/compilers2/css_media
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,25 @@ component Main {
}
--------------------------------------------------------------------------------
import {
createElement as C,
useComputed as B,
style as D
createElement as B,
style as C
} from "runtime";

const A = () => {
const
a = B(() => {
a = () => {
return `blue`
}),
},
b = () => {
const _ = {
[`--a-a`]: a.value,
[`--b-a`]: a.value
[`--a-a`]: a(),
[`--b-a`]: a()
};
return _
};
return C(`div`, {
return B(`div`, {
className: `Main_test`,
style: D([b()])
style: C([b()])
})
};

Expand Down
15 changes: 7 additions & 8 deletions spec/compilers2/css_selector
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,24 @@ component Main {
}
--------------------------------------------------------------------------------
import {
createElement as C,
useComputed as B,
style as D
createElement as B,
style as C
} from "runtime";

const A = () => {
const
a = B(() => {
a = () => {
return `blue`
}),
},
b = () => {
const _ = {
[`--a-a`]: a.value
[`--a-a`]: a()
};
return _
};
return C(`div`, {
return B(`div`, {
className: `Main_test`,
style: D([b()])
style: C([b()])
})
};

Expand Down
15 changes: 7 additions & 8 deletions spec/compilers2/css_selector_multiple
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,24 @@ component Main {
}
--------------------------------------------------------------------------------
import {
createElement as C,
useComputed as B,
style as D
createElement as B,
style as C
} from "runtime";

const A = () => {
const
a = B(() => {
a = () => {
return `blue`
}),
},
b = () => {
const _ = {
[`--a-a`]: a.value
[`--a-a`]: a()
};
return _
};
return C(`div`, {
return B(`div`, {
className: `Main_test`,
style: D([b()])
style: C([b()])
})
};

Expand Down
6 changes: 2 additions & 4 deletions spec/compilers2/function
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ component Main {
}
}
--------------------------------------------------------------------------------
import { define as B } from "runtime";

const A = () => {
const a = B('a', () => {
const a = () => {
return true
});
};
a();
return ``
};
Loading

0 comments on commit c01605b

Please sign in to comment.